Module Name: src Committed By: martin Date: Fri Feb 24 14:19:56 UTC 2023
Modified Files: src/sys/dev/ata [netbsd-8]: sata_subr.c satavar.h Log Message: Pull up following revision(s) (requested by msaitoh in ticket #1805): sys/dev/ata/satavar.h: revision 1.10 sys/dev/ata/sata_subr.c: revision 1.24 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 To generate a diff of this commit: cvs rdiff -u -r1.22 -r1.22.2.1 src/sys/dev/ata/sata_subr.c cvs rdiff -u -r1.9 -r1.9.28.1 src/sys/dev/ata/satavar.h Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/sys/dev/ata/sata_subr.c diff -u src/sys/dev/ata/sata_subr.c:1.22 src/sys/dev/ata/sata_subr.c:1.22.2.1 --- src/sys/dev/ata/sata_subr.c:1.22 Wed May 10 08:46:39 2017 +++ src/sys/dev/ata/sata_subr.c Fri Feb 24 14:19:55 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: sata_subr.c,v 1.22 2017/05/10 08:46:39 msaitoh Exp $ */ +/* $NetBSD: sata_subr.c,v 1.22.2.1 2023/02/24 14:19:55 martin 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.22 2017/05/10 08:46:39 msaitoh Exp $"); +__KERNEL_RCSID(0, "$NetBSD: sata_subr.c,v 1.22.2.1 2023/02/24 14:19:55 martin Exp $"); #include <sys/param.h> #include <sys/kernel.h> @@ -120,6 +120,14 @@ sata_reset_interface(struct ata_channel } } + 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. */ @@ -132,7 +140,7 @@ sata_reset_interface(struct ata_channel 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; @@ -146,7 +154,6 @@ sata_reset_interface(struct ata_channel device_xname(chp->ch_atac->atac_dev), chp->ch_channel, sstatus); } - return(sstatus & SStatus_DET_mask); } void Index: src/sys/dev/ata/satavar.h diff -u src/sys/dev/ata/satavar.h:1.9 src/sys/dev/ata/satavar.h:1.9.28.1 --- src/sys/dev/ata/satavar.h:1.9 Wed Apr 3 17:15:07 2013 +++ src/sys/dev/ata/satavar.h Fri Feb 24 14:19:55 2023 @@ -1,4 +1,4 @@ -/* $NetBSD: satavar.h,v 1.9 2013/04/03 17:15:07 bouyer Exp $ */ +/* $NetBSD: satavar.h,v 1.9.28.1 2023/02/24 14:19:55 martin 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_ */