> index 0962fd5..c3aea06 100644 > --- a/drivers/scsi/device_handler/scsi_dh_alua.c > +++ b/drivers/scsi/device_handler/scsi_dh_alua.c > @@ -1100,6 +1100,8 @@ static int alua_bus_attach(struct scsi_device *sdev) > err = alua_initialize(sdev, h); > if (err == SCSI_DH_NOMEM) > ret = -ENOMEM; > + if (err == SCSI_DH_DEV_UNSUPP) > + ret = -ENODEV; > if (err != SCSI_DH_OK && err != SCSI_DH_DEV_OFFLINED) > goto failed; This screams for a switch statement.. > --- a/drivers/scsi/scsi_dh.c > +++ b/drivers/scsi/scsi_dh.c > @@ -133,8 +133,9 @@ static int scsi_dh_handler_attach(struct scsi_device *sdev, > > error = scsi_dh->attach(sdev); > if (error) { > - sdev_printk(KERN_ERR, sdev, "%s: Attach failed (%d)\n", > - scsi_dh->name, error); > + if (error != -ENODEV) > + sdev_printk(KERN_ERR, sdev, "%s: Attach failed (%d)\n", > + scsi_dh->name, error); > module_put(scsi_dh->module); OTOH why don't we just return the SCSI_DH_ values from ->attach?