1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-19 10:53:58 +00:00

In atapi_cam_reinit_bus, only call reinit_bus if the ATAPI channel

has already been registered with ATAPI/CAM (else there is nothing
to do). atapi_cam_reinit_bus may be called before the bus is
registered if an ATAPI command times out during the boot sequence.

PR:		i386/51421
Reviewed by:	roberto
Approved by:	re (rwatson)
MFC after:	1 week
This commit is contained in:
Thomas Quinot 2003-05-14 14:20:22 +00:00
parent 1870b993d0
commit b3c957133a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=114994

View File

@ -167,7 +167,14 @@ atapi_cam_detach_bus(struct ata_channel *ata_ch)
void
atapi_cam_reinit_bus(struct ata_channel *ata_ch) {
struct atapi_xpt_softc *scp = get_softc(ata_ch);
reinit_bus(scp, RESET);
/*
* scp might be null if the bus is being reinitialised during
* the boot-up sequence, before the ATAPI bus is registered.
*/
if (scp != NULL)
reinit_bus(scp, RESET);
}
static void