LKML Archive on lore.kernel.org
help / color / mirror / Atom feed
* [PATCH] libata and starting/stopping ATAPI floppy devices
@ 2008-01-05 15:47 Ondrej Zary
  2008-01-09  2:41 ` Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Ondrej Zary @ 2008-01-05 15:47 UTC (permalink / raw)
  To: jgarzik; +Cc: linux-ide, Linux Kernel

Hello,
I switched to libata drivers for my onboard PATA controller (PIIX4) recently. 
Everything works fine except that kernel tries to start not only my hard 
drive (sda) but also LS-120 floppy drive (sdb) which does not like it:

sd 0:0:0:0: [sda] Starting disk
ata1.00: configured for UDMA/33
sd 0:0:0:0: [sda] 58633344 512-byte hardware sectors (30020 MB)
sd 0:0:0:0: [sda] Write Protect is off
sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support 
DPO or FUA
sd 1:0:1:0: [sdb] Starting disk
ata2.00: configured for UDMA/33
ata2.01: configured for PIO2
sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0


The question is: is it correct? Or a patch like this should be applied?

--- linux-2.6.23-orig/drivers/ata/libata-scsi.c	2007-10-09 22:31:38.000000000 +0200
+++ linux-2.6.23-pentium/drivers/ata/libata-scsi.c	2008-01-05 15:50:16.000000000 +0100
@@ -802,7 +802,8 @@
 
 	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
 
-	sdev->manage_start_stop = 1;
+	if (dev->class == ATA_DEV_ATA)
+		sdev->manage_start_stop = 1;
 
 	if (dev)
 		ata_scsi_dev_config(sdev, dev);


-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libata and starting/stopping ATAPI floppy devices
  2008-01-05 15:47 [PATCH] libata and starting/stopping ATAPI floppy devices Ondrej Zary
@ 2008-01-09  2:41 ` Tejun Heo
  2008-01-09 17:53   ` Ondrej Zary
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2008-01-09  2:41 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: jgarzik, linux-ide, Linux Kernel

Ondrej Zary wrote:
> Hello,
> I switched to libata drivers for my onboard PATA controller (PIIX4) recently. 
> Everything works fine except that kernel tries to start not only my hard 
> drive (sda) but also LS-120 floppy drive (sdb) which does not like it:
> 
> sd 0:0:0:0: [sda] Starting disk
> ata1.00: configured for UDMA/33
> sd 0:0:0:0: [sda] 58633344 512-byte hardware sectors (30020 MB)
> sd 0:0:0:0: [sda] Write Protect is off
> sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support 
> DPO or FUA
> sd 1:0:1:0: [sdb] Starting disk
> ata2.00: configured for UDMA/33
> ata2.01: configured for PIO2
> sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
> sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
> sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0
> 
> 
> The question is: is it correct? Or a patch like this should be applied?

Yeah, looks good to me.  Please reformat the message w/ S-O-B.

Acked-by: Tejun Heo <htejun@gmail.com>

-- 
tejun

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libata and starting/stopping ATAPI floppy devices
  2008-01-09  2:41 ` Tejun Heo
@ 2008-01-09 17:53   ` Ondrej Zary
  2008-01-09 23:41     ` Tejun Heo
  0 siblings, 1 reply; 7+ messages in thread
From: Ondrej Zary @ 2008-01-09 17:53 UTC (permalink / raw)
  To: Tejun Heo; +Cc: jgarzik, linux-ide, Linux Kernel

On Wednesday 09 January 2008 03:41:16 Tejun Heo wrote:
> Ondrej Zary wrote:
> > Hello,
> > I switched to libata drivers for my onboard PATA controller (PIIX4)
> > recently. Everything works fine except that kernel tries to start not
> > only my hard drive (sda) but also LS-120 floppy drive (sdb) which does
> > not like it:
> >
> > sd 0:0:0:0: [sda] Starting disk
> > ata1.00: configured for UDMA/33
> > sd 0:0:0:0: [sda] 58633344 512-byte hardware sectors (30020 MB)
> > sd 0:0:0:0: [sda] Write Protect is off
> > sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't
> > support DPO or FUA
> > sd 1:0:1:0: [sdb] Starting disk
> > ata2.00: configured for UDMA/33
> > ata2.01: configured for PIO2
> > sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
> > sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
> > sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0
> >
> >
> > The question is: is it correct? Or a patch like this should be applied?
>
> Yeah, looks good to me.  Please reformat the message w/ S-O-B.
>
> Acked-by: Tejun Heo <htejun@gmail.com>

Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy 
drives) as they don't seem to like it:

sd 1:0:1:0: [sdb] Starting disk
ata2.01: configured for PIO2
sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>

--- linux-2.6.23-orig/drivers/ata/libata-scsi.c	2007-10-09 22:31:38.000000000 +0200
+++ linux-2.6.23-pentium/drivers/ata/libata-scsi.c	2008-01-05 15:50:16.000000000 +0100
@@ -802,7 +802,8 @@
 
 	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
 
-	sdev->manage_start_stop = 1;
+	if (dev->class == ATA_DEV_ATA)
+		sdev->manage_start_stop = 1;
 
 	if (dev)
 		ata_scsi_dev_config(sdev, dev);


-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 7+ messages in thread

* [PATCH] libata and starting/stopping ATAPI floppy devices
  2008-01-09 17:53   ` Ondrej Zary
@ 2008-01-09 23:41     ` Tejun Heo
  2008-01-10 22:21       ` Jeff Garzik
  0 siblings, 1 reply; 7+ messages in thread
From: Tejun Heo @ 2008-01-09 23:41 UTC (permalink / raw)
  To: Ondrej Zary; +Cc: jgarzik, linux-ide, Linux Kernel

From: Ondrej Zary <linux@rainbow-software.org>

Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy 
drives) as they don't seem to like it:

sd 1:0:1:0: [sdb] Starting disk
ata2.01: configured for PIO2
sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0

Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
Signed-off-by: Tejun Heo <htejun@gmail.com>
---
Trimmed message body and reformatted such that it's script friendly.

 drivers/ata/libata-scsi.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

--- linux-2.6.23-orig/drivers/ata/libata-scsi.c	2007-10-09 22:31:38.000000000 +0200
+++ linux-2.6.23-pentium/drivers/ata/libata-scsi.c	2008-01-05 15:50:16.000000000 +0100
@@ -802,7 +802,8 @@
 
 	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
 
-	sdev->manage_start_stop = 1;
+	if (dev->class == ATA_DEV_ATA)
+		sdev->manage_start_stop = 1;
 
 	if (dev)
 		ata_scsi_dev_config(sdev, dev);


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libata and starting/stopping ATAPI floppy devices
  2008-01-09 23:41     ` Tejun Heo
@ 2008-01-10 22:21       ` Jeff Garzik
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Garzik @ 2008-01-10 22:21 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Ondrej Zary, linux-ide, Linux Kernel

Tejun Heo wrote:
> From: Ondrej Zary <linux@rainbow-software.org>
> 
> Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy 
> drives) as they don't seem to like it:
> 
> sd 1:0:1:0: [sdb] Starting disk
> ata2.01: configured for PIO2
> sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
> sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
> sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0
> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> Trimmed message body and reformatted such that it's script friendly.
> 
>  drivers/ata/libata-scsi.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- linux-2.6.23-orig/drivers/ata/libata-scsi.c	2007-10-09 22:31:38.000000000 +0200
> +++ linux-2.6.23-pentium/drivers/ata/libata-scsi.c	2008-01-05 15:50:16.000000000 +0100
> @@ -802,7 +802,8 @@
>  
>  	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
>  
> -	sdev->manage_start_stop = 1;
> +	if (dev->class == ATA_DEV_ATA)
> +		sdev->manage_start_stop = 1;
>  
>  	if (dev)

applied #upstream-fixes manually.  not sure why git-am didn't like it, 
but patch(1) did.



^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libata and starting/stopping ATAPI floppy devices
  2008-01-10  1:05       ` Robert Hancock
@ 2008-01-10 17:42         ` Ondrej Zary
  0 siblings, 0 replies; 7+ messages in thread
From: Ondrej Zary @ 2008-01-10 17:42 UTC (permalink / raw)
  To: Robert Hancock; +Cc: Tejun Heo, jgarzik, linux-ide, Linux Kernel

On Thursday 10 January 2008 02:05:23 Robert Hancock wrote:
> Tejun Heo wrote:
> > From: Ondrej Zary <linux@rainbow-software.org>
> >
> > Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy
> > drives) as they don't seem to like it:
> >
> > sd 1:0:1:0: [sdb] Starting disk
> > ata2.01: configured for PIO2
> > sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
> > sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
> > sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0
>
> Well, all that error is saying is "No medium present". We could just
> make sd suppress that error on disk starting/stopping..

Yes, provided that the start/stop command is valid for ATAPI drives and is the 
correct thing to do. I don't know.

>
> > Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> > Signed-off-by: Tejun Heo <htejun@gmail.com>
> > ---
> > Trimmed message body and reformatted such that it's script friendly.
> >
> >  drivers/ata/libata-scsi.c |    3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > --- linux-2.6.23-orig/drivers/ata/libata-scsi.c	2007-10-09
> > 22:31:38.000000000 +0200 +++
> > linux-2.6.23-pentium/drivers/ata/libata-scsi.c	2008-01-05
> > 15:50:16.000000000 +0100 @@ -802,7 +802,8 @@
> >
> >  	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
> >
> > -	sdev->manage_start_stop = 1;
> > +	if (dev->class == ATA_DEV_ATA)
> > +		sdev->manage_start_stop = 1;
> >
> >  	if (dev)
> >  		ata_scsi_dev_config(sdev, dev);



-- 
Ondrej Zary

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] libata and starting/stopping ATAPI floppy devices
       [not found]     ` <fa.EGIY7yNytG7Ky56/SjBE7Jpn2PY@ifi.uio.no>
@ 2008-01-10  1:05       ` Robert Hancock
  2008-01-10 17:42         ` Ondrej Zary
  0 siblings, 1 reply; 7+ messages in thread
From: Robert Hancock @ 2008-01-10  1:05 UTC (permalink / raw)
  To: Tejun Heo; +Cc: Ondrej Zary, jgarzik, linux-ide, Linux Kernel

Tejun Heo wrote:
> From: Ondrej Zary <linux@rainbow-software.org>
> 
> Prevent libata from starting/stopping non-ATA devices (like ATAPI floppy 
> drives) as they don't seem to like it:
> 
> sd 1:0:1:0: [sdb] Starting disk
> ata2.01: configured for PIO2
> sd 1:0:1:0: [sdb] Result: hostbyte=0x00 driverbyte=0x08
> sd 1:0:1:0: [sdb] Sense Key : 0x2 [current]
> sd 1:0:1:0: [sdb] ASC=0x3a ASCQ=0x0

Well, all that error is saying is "No medium present". We could just 
make sd suppress that error on disk starting/stopping..

> 
> Signed-off-by: Ondrej Zary <linux@rainbow-software.org>
> Signed-off-by: Tejun Heo <htejun@gmail.com>
> ---
> Trimmed message body and reformatted such that it's script friendly.
> 
>  drivers/ata/libata-scsi.c |    3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> --- linux-2.6.23-orig/drivers/ata/libata-scsi.c	2007-10-09 22:31:38.000000000 +0200
> +++ linux-2.6.23-pentium/drivers/ata/libata-scsi.c	2008-01-05 15:50:16.000000000 +0100
> @@ -802,7 +802,8 @@
>  
>  	blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD);
>  
> -	sdev->manage_start_stop = 1;
> +	if (dev->class == ATA_DEV_ATA)
> +		sdev->manage_start_stop = 1;
>  
>  	if (dev)
>  		ata_scsi_dev_config(sdev, dev);


-- 
Robert Hancock      Saskatoon, SK, Canada
To email, remove "nospam" from hancockr@nospamshaw.ca
Home Page: http://www.roberthancock.com/


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2008-01-10 22:22 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-05 15:47 [PATCH] libata and starting/stopping ATAPI floppy devices Ondrej Zary
2008-01-09  2:41 ` Tejun Heo
2008-01-09 17:53   ` Ondrej Zary
2008-01-09 23:41     ` Tejun Heo
2008-01-10 22:21       ` Jeff Garzik
     [not found] <fa.BDdayWpk9nIIgpj7VGhVqIbyE8o@ifi.uio.no>
     [not found] ` <fa.muhws6klIiRnTK7h6EBkcjLsWKc@ifi.uio.no>
     [not found]   ` <fa.zyXilo1bU+hQgN72pXqBeBGBIMs@ifi.uio.no>
     [not found]     ` <fa.EGIY7yNytG7Ky56/SjBE7Jpn2PY@ifi.uio.no>
2008-01-10  1:05       ` Robert Hancock
2008-01-10 17:42         ` Ondrej Zary

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).