Re: [PATCH v7 3/6] scsi: sr: support zero power ODD(ZPODD)

2012-09-27 Thread Aaron Lu
On 09/22/2012 05:02 AM, Rafael J. Wysocki wrote: > On Friday, September 21, 2012, Aaron Lu wrote: >> On Fri, Sep 21, 2012 at 12:07:23AM +0200, Rafael J. Wysocki wrote: >>> On Wednesday, September 12, 2012, Aaron Lu wrote: static struct scsi_driver sr_template = { .owner

Re: [PATCH v7 0/6] ZPODD patches

2012-09-27 Thread Aaron Lu
On Tue, Sep 25, 2012 at 03:02:29PM +0400, James Bottomley wrote: > On Tue, 2012-09-25 at 16:18 +0800, Aaron Lu wrote: > > A example patch would be something like the following, I didn't seperate > > these ACPI calls in sr.c as this is just a concept proof, if this is the > > right thing to do, I wi

[PATCH scsi] Short the path length of scsi_cmd_to_driver()

2012-09-27 Thread Li Zhong
Hi James, Martin, Here is the updated version, please help to review. Thanks, Zhong As suggested by James: this patch tries to short the path length of scsi_cmd_to_driver(). As only REQ_TYPE_BLOCK_PC commands can be submitted without a driver, so we could avoid the related NULL check

Re: [PATCH v7 2/6] scsi: sr: support runtime pm

2012-09-27 Thread Oliver Neukum
On Tuesday 25 September 2012 16:01:35 Aaron Lu wrote: > On Mon, Sep 24, 2012 at 11:40:18PM +0200, Rafael J. Wysocki wrote: > > On Monday, September 24, 2012, Aaron Lu wrote: > > > On Mon, Sep 24, 2012 at 02:55:31PM +0200, Rafael J. Wysocki wrote: > I just checked the spec again and tested, when th

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
On Wed, Sep 26, 2012 at 8:16 PM, Adrian Sandu wrote: > 2012-09-26T20:13:09.700606+03:00 d3xt3r01 kernel: [ 2466.455403] usb > 3-1.1: reset SuperSpeed USB device number 14 using xhci_hcd > 2012-09-26T20:13:09.713629+03:00 d3xt3r01 kernel: [ 2466.468373] > xhci_hcd :04:00.0: xHCI xhci_drop_endpo

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
Please trim unnecessary junk from your emails. There's no reason to send all the stuff at the end of those messages to everybody on the mailing list. On Thu, 27 Sep 2012, Adrian Sandu wrote: > Anything else I can help with ? :| I'm stuck .. dunno what to test > more or what else helpfull info

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
>> Anything else I can help with ? :| I'm stuck .. dunno what to test >> more or what else helpfull info I could give ya' guys .. > > You could run a test with a 3.3 kernel, as Sarah asked earlier. Other > than that, I can't think of anything. Maybe Sarah will come up with a > patch for you to tr

Re: [PATCH v7 3/6] scsi: sr: support zero power ODD(ZPODD)

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Aaron Lu wrote: > > Moreover, I'd like to migrate SCSI drivers to the PM handling based on > > struct > > dev_pm_ops eventually and your change is kind of going in the opposite > > direction. I don't know how much effort the migration is going to take, > > though, so perhaps

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote: > >> Anything else I can help with ? :| I'm stuck .. dunno what to test > >> more or what else helpfull info I could give ya' guys .. > > > > You could run a test with a 3.3 kernel, as Sarah asked earlier. Other > > than that, I can't think of anything. M

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
>> I tried with a 3.3.8 , same thing happened. I don't understand why my >> gentoo (asrock) fails and fedora(laptop) didn't ! :| >> Why ? What causes it to shutdown ? It can copy to/from drives ( in the >> hub or directly in the root hub ) .. but what makes it fail sometimes >> :| > > If we knew th

Re: [PATCH v7 3/6] scsi: sr: support zero power ODD(ZPODD)

2012-09-27 Thread Aaron Lu
On 09/27/2012 10:42 PM, Alan Stern wrote: > On Thu, 27 Sep 2012, Aaron Lu wrote: > >>> Moreover, I'd like to migrate SCSI drivers to the PM handling based on >>> struct >>> dev_pm_ops eventually and your change is kind of going in the opposite >>> direction. I don't know how much effort the migr

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote: > >> I tried with a 3.3.8 , same thing happened. I don't understand why my > >> gentoo (asrock) fails and fedora(laptop) didn't ! :| > >> Why ? What causes it to shutdown ? It can copy to/from drives ( in the > >> hub or directly in the root hub ) .. but wh

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote: > I tried with a 3.3.8 , same thing happened. I don't understand why my > gentoo (asrock) fails and fedora(laptop) didn't ! :| Come to think of it, you could try running the same kernel on both computers to see what happens. For example, boot both of the

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Peter Stuge
Adrian Sandu wrote: > I tried with a 3.3.8 , same thing happened. I don't understand why my > gentoo (asrock) fails and fedora(laptop) didn't ! :| Try what Alan suggested, start the Gentoo userland with the Fedora kernel. Do you have some crazy USE flags for your toolchain? If the Fedora kernel

[PATCH 0/3 v3] blk_cleanup_queue() versus request_fn order fix

2012-09-27 Thread Bart Van Assche
At device removal time request processing functions like scsi_request_fn() that unlock the queue lock internally may cause blk_cleanup_queue() to finish while request_fn is in progress. This three-patch series makes sure that blk_cleanup_queue() can't finish before all active request_fn calls have

[PATCH 1/3] block: Rename queue dead flag

2012-09-27 Thread Bart Van Assche
This flag is used to indicate that queuing new requests must stop. After this flag has been set queue draining starts. However, during the queue draining phase it is still safe to invoke the queue's request_fn, so "dying" is a better name than "dead". This patch is the result of running the comman

[PATCH 2/3] block: Avoid that request_fn is invoked on a dead queue

2012-09-27 Thread Bart Van Assche
Avoid that request_fn gets invoked after queue draining finished. blk_cleanup_queue() callers expect that request handling has finished once this function has returned so request_fn must not get invoked after blk_cleanup_queue() finished. Cc: James Bottomley Cc: Mike Christie Cc: Jens Axboe Cc:

[PATCH 3/3] Make blk_cleanup_queue() wait until request_fn finished

2012-09-27 Thread Bart Van Assche
Some request_fn implementations, e.g. scsi_request_fn(), unlock the queue lock. Make sure that blk_cleanup_queue() waits until all active request_fn invocations have finished. This fixes a potential use-after-free at the end of scsi_request_fn(). Reported-by: Chanho Min Cc: James Bottomley Cc: M

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
> Adrian Sandu wrote: >> I tried with a 3.3.8 , same thing happened. I don't understand why my >> gentoo (asrock) fails and fedora(laptop) didn't ! :| > > Try what Alan suggested, start the Gentoo userland with the Fedora > kernel. I tried booting a Fedora-17-x86_64-Live-Desktop.iso .. same thing

Re: [PATCH scsi] Add NULL checking of return value from scsi_cmd_to_driver()

2012-09-27 Thread Martin K. Petersen
> "James" == James Bottomley writes: >> I'm fine with having the eh action be triggered for FS requests only, >> if that's what you're asking? James> Sort of ... I was thinking do it for all non REQ_TYPE_BLOCK_PC James> commands (which includes flush and other strange types), but if James> y

Re: [PATCH scsi] Short the path length of scsi_cmd_to_driver()

2012-09-27 Thread Martin K. Petersen
> "Li" == Li Zhong writes: > @@ -845,8 +844,11 @@ static int scsi_send_eh_cmnd(struct scsi_cmnd *scmd, > unsigned char *cmnd, > > scsi_eh_restore_cmnd(scmd, &ses); > >- if (sdrv && sdrv->eh_action) >- rtn = sdrv->eh_action(scmd, cmnd, cmnd_size, rtn); >+ if (sc

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
>> Adrian Sandu wrote: >>> I tried with a 3.3.8 , same thing happened. I don't understand why my >>> gentoo (asrock) fails and fedora(laptop) didn't ! :| Tried to use the live cd on my laptop, can't reproduce it in any way on my computer .. Using the same live cd I can reproduce the problem on the

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Alan Stern
On Thu, 27 Sep 2012, Adrian Sandu wrote: > >> Adrian Sandu wrote: > >>> I tried with a 3.3.8 , same thing happened. I don't understand why my > >>> gentoo (asrock) fails and fedora(laptop) didn't ! :| > > Tried to use the live cd on my laptop, can't reproduce it in any way > on my computer .. > U

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
> Since you are using the same live CD on both computers, this has to be > caused by a difference in the hardware. What do "lspci -vvv" and > "lspci -vvv -n" show on the two computers? http://d3xt3r01.tk/~dexter/usbmon/asrock_lspci http://d3xt3r01.tk/~dexter/usbmon/vaio_lspci -- To unsubscribe fr

[PATCH 3/3] libata: Change transport topology layout

2012-09-27 Thread Gwendal Grignou
Integrate ata objects [port, link, device] with scsi objects. The path of a scsi device is: .../:00:1f.2/host0/ata1/link1/dev1.0/target0:0:0/0:0:0:0 or when a port multiplier is present: for instance the device in port 4 of the port multiplier: .../:00:06.0/:09:00.0/host5/ata6/link6.

[PATCH 0/3] Insert ATA transport objects in SCSI syfs topology.

2012-09-27 Thread Gwendal Grignou
This set of patches improve ATA transport classes integration with SCSI objects. Before [2.6.x] Ata and scsi transport class where separated: `--:09:00.0 | `--ata1 | | `--port_port | | `--link1 | | | `--dev1.0 | | | `--dev1.1 | `--ata2 | ... | `--host0 | | `--scsi_host | | |

[PATCH 2/3] scsi: Allow devices to have arbitrary parent

2012-09-27 Thread Gwendal Grignou
Allow driver who calls __scsi_add_device directly to create the scsi device on any parent, not just scsi_host directly. This is alreay done for transport with their own class [SAS, iSCSI, FC, ...] Change-Id: Ibcf132a8959fbf732dcd0b34a7f4a570d7cf394d Signed-off-by: Gwendal Grignou --- drivers/at

[PATCH 1/3] Revert "ata: make ata port as parent device of scsi host"

2012-09-27 Thread Gwendal Grignou
This reverts commit 9a6d6a2ddabbd32c07f6a38b659e5f3db319fa5a. Instead, melt libata transport sysfs object in scsi objects. Change-Id: I8c709f63ddf7ba97b9e6f449d5c0b8b85e44e818 Signed-off-by: Gwendal Grignou --- drivers/ata/libata-scsi.c |2 +- 1 files changed, 1 insertions(+), 1 deletions(

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Sarah Sharp
On Thu, Sep 27, 2012 at 10:02:22PM +0300, Adrian Sandu wrote: > > Since you are using the same live CD on both computers, this has to be > > caused by a difference in the hardware. What do "lspci -vvv" and > > "lspci -vvv -n" show on the two computers? > > http://d3xt3r01.tk/~dexter/usbmon/asrock

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
> They're the same chipset. There's minor differences in the PCI > capabilities, but not much else. It could be something electrically > wrong with the AsRock system, I suppose. That's possible if you see > the errors popping up erratically. > > Any chance you can exchange the AsRock system? No

Re: [PATCH v7 3/6] scsi: sr: support zero power ODD(ZPODD)

2012-09-27 Thread Rafael J. Wysocki
On Thursday, September 27, 2012, Aaron Lu wrote: > On 09/27/2012 10:42 PM, Alan Stern wrote: > > On Thu, 27 Sep 2012, Aaron Lu wrote: > > > >>> Moreover, I'd like to migrate SCSI drivers to the PM handling based on > >>> struct > >>> dev_pm_ops eventually and your change is kind of going in the o

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Theodore Kilgore
Adrian, I think that the suggestion about checking the power supply, the cabling, the grounding screws, and anything of like nature that has been omitted from this list is a very good idea. If successful it would eliminate the problem for you, as well as resolving the mystery. Unresolved myst

Re: [PATCH 0/3] Insert ATA transport objects in SCSI syfs topology.

2012-09-27 Thread Aaron Lu
On Thu, Sep 27, 2012 at 12:04:01PM -0700, Gwendal Grignou wrote: > This set of patches improve ATA transport classes integration with SCSI > objects. > > Before [2.6.x] > > Ata and scsi transport class where separated: > `--:09:00.0 > | `--ata1 > | | `--port_port > | | `--link1 > | | |

Re: [PATCH 3/3] libata: Change transport topology layout

2012-09-27 Thread Aaron Lu
On Thu, Sep 27, 2012 at 12:04:04PM -0700, Gwendal Grignou wrote: > Integrate ata objects [port, link, device] with scsi objects. > > > The path of a scsi device is: > .../:00:1f.2/host0/ata1/link1/dev1.0/target0:0:0/0:0:0:0 After test, I noticed that this will break the current ata acpi bind

Re: [usb-storage] Re: usb3 fails to write when using usb3 hub in usb3 port

2012-09-27 Thread Adrian Sandu
> > Adrian, > > I think that the suggestion about checking the power supply, the cabling, > the grounding screws, and anything of like nature that has been omitted > from this list is a very good idea. If successful it would eliminate > the problem for you, as well as resolving the mystery. Unresol