Re: [V2 PATCH 3/4] scsi:stex.c Add reboot support

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, Nov 12, 2014 at 09:27:50AM -0800, Christoph Hellwig wrote:
> > +static int stex_reboot_callback(struct notifier_block *self,
> > +							  unsigned long val,
> > +							  void *data)
> > +{
> > +	if (val == SYS_RESTART)
> > +		isRestart = 1;
> > +	return NOTIFY_OK;
> > +}
> > 
> > @@ -1832,7 +1859,14 @@ static void stex_shutdown(struct pci_dev *pdev)
> >  {
> >  	struct st_hba *hba = pci_get_drvdata(pdev);
> > 
> > -	stex_hba_stop(hba);
> > +	if (hba->yellowstone == 1)
> > +		stex_hba_stop(hba, ST_IGNORED);
> > +	else {
> > +		if (isRestart)
> > +			stex_hba_stop(hba, ST_S6);
> > +		else
> > +			stex_hba_stop(hba, ST_S5);
> > +	}
> 
> This sort of check for reboot vs restart isn't really something
> we want in drivers.  I don't really know how we could find this
> out assuming we even want drivers to behave differently.
> 
> Maybe Greg or someone on lkml has an idea how to best handle this case.

What is "this case"?

And yes, I agree, we shouldn't care, in drivers, about reboot vs.
restart, as they should both be the same thing, along with "disconnect",
right?

thanks,

greg k-h
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux