Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/dev/ata split the port status reporting to new function ...
details: https://anonhg.NetBSD.org/src/rev/780319e8c89f
branches: trunk
changeset: 320065:780319e8c89f
user: jdolecek <jdolecek%NetBSD.org@localhost>
date: Thu Jun 21 21:52:15 2018 +0000
description:
split the port status reporting to new function sata_interpret_det()
so it can be called separately from sata_reset_interface()
do not treat PHY offline as an error, it's pretty normal when there
is no device actually connected
debugging aid for PR kern/52372
diffstat:
sys/dev/ata/sata_subr.c | 15 +++++++++++----
sys/dev/ata/satavar.h | 3 ++-
2 files changed, 13 insertions(+), 5 deletions(-)
diffs (67 lines):
diff -r caf59b7156b1 -r 780319e8c89f sys/dev/ata/sata_subr.c
--- a/sys/dev/ata/sata_subr.c Thu Jun 21 17:03:45 2018 +0000
+++ b/sys/dev/ata/sata_subr.c Thu Jun 21 21:52:15 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: sata_subr.c,v 1.23 2017/10/07 16:05:32 jdolecek Exp $ */
+/* $NetBSD: sata_subr.c,v 1.24 2018/06/21 21:52:15 jdolecek Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -33,7 +33,7 @@
* Common functions for Serial ATA.
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sata_subr.c,v 1.23 2017/10/07 16:05:32 jdolecek Exp $");
+__KERNEL_RCSID(0, "$NetBSD: sata_subr.c,v 1.24 2018/06/21 21:52:15 jdolecek Exp $");
#include <sys/param.h>
#include <sys/kernel.h>
@@ -121,6 +121,14 @@
}
}
+ sata_interpret_det(chp, sstatus);
+
+ return (sstatus & SStatus_DET_mask);
+}
+
+void
+sata_interpret_det(struct ata_channel *chp, uint32_t sstatus)
+{
switch (sstatus & SStatus_DET_mask) {
case SStatus_DET_NODEV:
/* No Device; be silent. */
@@ -133,7 +141,7 @@
break;
case SStatus_DET_OFFLINE:
- aprint_error("%s port %d: PHY offline\n",
+ aprint_normal("%s port %d: PHY offline\n",
device_xname(chp->ch_atac->atac_dev), chp->ch_channel);
break;
@@ -147,7 +155,6 @@
device_xname(chp->ch_atac->atac_dev), chp->ch_channel,
sstatus);
}
- return(sstatus & SStatus_DET_mask);
}
void
diff -r caf59b7156b1 -r 780319e8c89f sys/dev/ata/satavar.h
--- a/sys/dev/ata/satavar.h Thu Jun 21 17:03:45 2018 +0000
+++ b/sys/dev/ata/satavar.h Thu Jun 21 21:52:15 2018 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: satavar.h,v 1.9 2013/04/03 17:15:07 bouyer Exp $ */
+/* $NetBSD: satavar.h,v 1.10 2018/06/21 21:52:15 jdolecek Exp $ */
/*-
* Copyright (c) 2004 The NetBSD Foundation, Inc.
@@ -42,6 +42,7 @@
const char *sata_speed(uint32_t);
uint32_t sata_reset_interface(struct ata_channel *, bus_space_tag_t,
bus_space_handle_t, bus_space_handle_t, int);
+void sata_interpret_det(struct ata_channel *, uint32_t);
void sata_interpret_sig(struct ata_channel *, int, uint32_t);
#endif /* _DEV_ATA_SATAVAR_H_ */
- Prev by Date:
[src/trunk]: src/sys/net80211 remove unused arguments
- Next by Date:
[src/trunk]: src/share/misc Add AFP, AMD, ASA, BSDP, DEC, IPL, MDMX, MIPS, PI...
- Previous by Thread:
[src/trunk]: src/sys/net80211 remove unused arguments
- Next by Thread:
[src/trunk]: src/share/misc Add AFP, AMD, ASA, BSDP, DEC, IPL, MDMX, MIPS, PI...
- Indexes:
Home |
Main Index |
Thread Index |
Old Index