Re: 'Device not ready' issue on mpt2sas since 3.1.10

2012-07-22 Thread Tejun Heo
Hello, On Sat, Jul 21, 2012 at 02:15:56PM +0200, Matthias Prager wrote: > Now I'm not sure this isn't taping over another bug. Which leads me to > my question: What is the correct behavior? > > #1 Issuing a separate spin-up command (START UNIT?) prior to sending i/o > by setting allow_restart=1 f

Re: 'Device not ready' issue on mpt2sas since 3.1.10

2012-07-22 Thread Matthias Prager
Hello Tejun, Am 22.07.2012 19:31, schrieb Tejun Heo:> > I haven't consulted SAT but it seems like a bug in SAS driver or > firmware. If it's a driver bug, we better fix it there. If a > firmware bug, working around those is one of major roles of drivers, > so I think setting allow_restart is fin

Re: question about path_id of scsi hard disk

2012-07-22 Thread gaoqiang
在 Sat, 21 Jul 2012 06:31:54 +0800,James Bottomley 写道: On Fri, 2012-07-20 at 16:24 +0800, gaoqiang wrote: I'm using udev to manage my hard disks. but I'm confusing about the "PATH_ID" gaoqiang@h150:~$/lib/udev/path_id /block/sda ID_PATH=pci-:01:00.0-scsi-0:0:0:0 the path_id is about di

RE question about path_id of scsi hard disk

2012-07-22 Thread Jack Wang
> 在 Sat, 21 Jul 2012 06:31:54 +0800,James Bottomley > 写道: > > > On Fri, 2012-07-20 at 16:24 +0800, gaoqiang wrote: > >> I'm using udev to manage my hard disks. but I'm confusing > >> about the "PATH_ID" > >> > >> gaoqiang@h150:~$/lib/udev/path_id /block/sda > >> ID_PATH=pci-:01:00.0-scsi-0:0

[PATCH 2/5] scsi: sr: runtime pm when ODD is open/closed

2012-07-22 Thread Aaron Lu
The ODD can either be runtime resumed by the user or by a software request. And for the latter part, we only support runtime resume the ODD when the eject request is received. We did this in sr's block ioctl function, this looks ugly. Change this by runtime resuming the ODD in its open function an

[PATCH 4/5] scsi: pm: use runtime resume callback if available

2012-07-22 Thread Aaron Lu
When runtime resume a scsi device, if the device's driver has implemented runtime resume callback, use that instead of the resume callback. sr driver needs this to properly do different things for system resume and runtime resume. Signed-off-by: Aaron Lu --- drivers/scsi/scsi_pm.c | 14

[PATCH 5/5] block: genhd: add an interface to set disk's poll interval

2012-07-22 Thread Aaron Lu
Set the ODD's in kernel poll interval to 2s for the user in case the user is using an old distro on which udev will not set the system wide block parameter events_dfl_poll_msecs. Signed-off-by: Aaron Lu --- block/genhd.c | 23 +-- drivers/scsi/sr.c | 1 + include

[PATCH 0/5] Fix for ZPODD

2012-07-22 Thread Aaron Lu
Here are some patches to make ZPODD easier to use for end users and a fix for using ZPODD with system suspend. Aaron Lu (5): scsi: sr: fix for sr suspend and resume scsi: sr: runtime pm when ODD is open/closed scsi: sr: block events when runtime suspended scsi: pm: use runtime resume callb

[PATCH 1/5] scsi: sr: fix for sr suspend and resume

2012-07-22 Thread Aaron Lu
In sr_suspend, we do not need to do anything if it is not a runtime pm request, so just return by checking the PM_EVENT_AUTO flag. And in sr_resume, only reset the suspend_count back to 1 if the ODD is waken up by the user, or the usage count of the scsi device will not balance. Signed-off-by: Aar