Re: [PATCH 9/15] ide: add PIO masks

2007-07-05 Thread Jeff Garzik

Sergei Shtylyov wrote:

Hello.

Bartlomiej Zolnierkiewicz wrote:


* Add ATA_PIO[0-6] defines to linux/ata.h.



* Add -pio_mask field to ide_pci_device_t and ide_hwif_t.



* Add PIO masks to host drivers.


   Hm, the next logical step would be to use the mask constants in
linux/ata.h for the drivers' DMA caps too...


Certainly it is my hope to have share-able stuff in linux/ata.h that we 
all can use.  With ata_* (or ATA_*) prefix of course :)


Jeff



-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-07-04 Thread Alan Cox
  It doesn't need to do anything. 
 
 Not true. It should call ide_config_drive_speed() at least, else PIO 
 autotuning won't actually work.

Indeed - I forgot that old-ide doesn't do this itself but leaves it up to
the driver to forget 8)
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-07-04 Thread Bartlomiej Zolnierkiewicz
On Wednesday 04 July 2007, Alan Cox wrote:
   It doesn't need to do anything. 
  
  Not true. It should call ide_config_drive_speed() at least, else PIO 
  autotuning won't actually work.
 
 Indeed - I forgot that old-ide doesn't do this itself but leaves it up to
 the driver to forget 8)

OK, now that you both agree on the issue, could somebody please fix it? :-)

Thanks,
Bart
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-07-03 Thread Sergei Shtylyov

Hello.

Bartlomiej Zolnierkiewicz wrote:


* Add ATA_PIO[0-6] defines to linux/ata.h.



* Add -pio_mask field to ide_pci_device_t and ide_hwif_t.



* Add PIO masks to host drivers.


   Hm, the next logical step would be to use the mask constants in
linux/ata.h for the drivers' DMA caps too...


Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]


Acked-by: Sergei Shtylyov [EMAIL PROTECTED]


Index: b/drivers/ide/pci/it8213.c
===
--- a/drivers/ide/pci/it8213.c
+++ b/drivers/ide/pci/it8213.c
@@ -276,6 +276,7 @@ static void __devinit init_hwif_it8213(i
.enablebits = {{0x41,0x80,0x80}}, \
.bootable   = ON_BOARD, \
.host_flags = IDE_HFLAG_SINGLE, \
+   .pio_mask   = ATA_PIO4, \
}
 
 static ide_pci_device_t it8213_chipsets[] __devinitdata = {

[...]

Index: b/drivers/ide/pci/piix.c
===
--- a/drivers/ide/pci/piix.c
+++ b/drivers/ide/pci/piix.c
@@ -498,6 +498,7 @@ static void __devinit init_hwif_piix(ide
.autodma= AUTODMA,  \
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
.bootable   = ON_BOARD, \
+   .pio_mask   = ATA_PIO4, \
.udma_mask  = udma, \
}
 
@@ -517,6 +518,7 @@ static ide_pci_device_t piix_pci_info[] 
 		.enablebits	= {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},

.bootable   = ON_BOARD,
.host_flags = IDE_HFLAG_ISA_PORTS,
+   .pio_mask   = ATA_PIO4,
},
 
 	/*  3 */ DECLARE_PIIX_DEV(PIIX3, 0x00),	/* no udma */

[...]

Index: b/drivers/ide/pci/slc90e66.c
===
--- a/drivers/ide/pci/slc90e66.c
+++ b/drivers/ide/pci/slc90e66.c
@@ -217,6 +217,7 @@ static ide_pci_device_t slc90e66_chipset
.autodma= AUTODMA,
.enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
.bootable   = ON_BOARD,
+   .pio_mask   = ATA_PIO4,
 };

 static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct 

pci_device_id *id)

   Strictly speaking, these Intel/SMsC/ITE chips don't support PIO mode 1,
only modes 0 and 2 thru 4 but the drivers are just using PIO0 timings for 
PIO1...


Index: b/drivers/ide/pci/scc_pata.c
===
--- a/drivers/ide/pci/scc_pata.c
+++ b/drivers/ide/pci/scc_pata.c
@@ -734,6 +734,7 @@ static void __devinit init_hwif_scc(ide_
   .autodma = AUTODMA,  \
   .bootable= ON_BOARD, \
   .host_flags  = IDE_HFLAG_SINGLE, \
+  .pio_mask= ATA_PIO4, \


   Erm, formatting nit: leading spaces () and contrarywise, space ISO tab
after field name wouldn't have caught an eye. B-)
   Well, I see that the style is borken all over the macros, no forget about
spaces...


   }
 
 static ide_pci_device_t scc_chipsets[] __devinitdata = {

Index: b/drivers/ide/pci/sgiioc4.c
===
--- a/drivers/ide/pci/sgiioc4.c
+++ b/drivers/ide/pci/sgiioc4.c
@@ -586,6 +586,7 @@ ide_init_sgiioc4(ide_hwif_t * hwif)
hwif-ultra_mask = 0x0;  /* Disable Ultra DMA */
hwif-mwdma_mask = 0x2;  /* Multimode-2 DMA  */
hwif-swdma_mask = 0x2;
+   hwif-pio_mask = 0x00;


   I don't believe! :-D Should be at least supporting PIO0. ;-)


hwif-tuneproc = NULL;   /* Sets timing for PIO mode */


   ... but it won't matter anyway due to missing tuneproc() method.

MBR, Sergei

-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-07-03 Thread Bartlomiej Zolnierkiewicz
On Tuesday 03 July 2007, Sergei Shtylyov wrote:
 Hello.
 
 Bartlomiej Zolnierkiewicz wrote:
 
  * Add ATA_PIO[0-6] defines to linux/ata.h.
 
  * Add -pio_mask field to ide_pci_device_t and ide_hwif_t.
 
  * Add PIO masks to host drivers.
 
 Hm, the next logical step would be to use the mask constants in
 linux/ata.h for the drivers' DMA caps too...

Patches welcomed. :-)

  Signed-off-by: Bartlomiej Zolnierkiewicz [EMAIL PROTECTED]
 
 Acked-by: Sergei Shtylyov [EMAIL PROTECTED]

added

  Index: b/drivers/ide/pci/it8213.c
  ===
  --- a/drivers/ide/pci/it8213.c
  +++ b/drivers/ide/pci/it8213.c
  @@ -276,6 +276,7 @@ static void __devinit init_hwif_it8213(i
  .enablebits = {{0x41,0x80,0x80}}, \
  .bootable   = ON_BOARD, \
  .host_flags = IDE_HFLAG_SINGLE, \
  +   .pio_mask   = ATA_PIO4, \
  }
   
   static ide_pci_device_t it8213_chipsets[] __devinitdata = {
 [...]
  Index: b/drivers/ide/pci/piix.c
  ===
  --- a/drivers/ide/pci/piix.c
  +++ b/drivers/ide/pci/piix.c
  @@ -498,6 +498,7 @@ static void __devinit init_hwif_piix(ide
  .autodma= AUTODMA,  \
  .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}}, \
  .bootable   = ON_BOARD, \
  +   .pio_mask   = ATA_PIO4, \
  .udma_mask  = udma, \
  }
   
  @@ -517,6 +518,7 @@ static ide_pci_device_t piix_pci_info[] 
  .enablebits = {{0x6d,0xc0,0x80}, {0x6d,0xc0,0xc0}},
  .bootable   = ON_BOARD,
  .host_flags = IDE_HFLAG_ISA_PORTS,
  +   .pio_mask   = ATA_PIO4,
  },
   
  /*  3 */ DECLARE_PIIX_DEV(PIIX3, 0x00),   /* no udma */
 [...]
  Index: b/drivers/ide/pci/slc90e66.c
  ===
  --- a/drivers/ide/pci/slc90e66.c
  +++ b/drivers/ide/pci/slc90e66.c
  @@ -217,6 +217,7 @@ static ide_pci_device_t slc90e66_chipset
  .autodma= AUTODMA,
  .enablebits = {{0x41,0x80,0x80}, {0x43,0x80,0x80}},
  .bootable   = ON_BOARD,
  +   .pio_mask   = ATA_PIO4,
   };
 
   static int __devinit slc90e66_init_one(struct pci_dev *dev, const struct 
 pci_device_id *id)
 
 Strictly speaking, these Intel/SMsC/ITE chips don't support PIO mode 1,
 only modes 0 and 2 thru 4 but the drivers are just using PIO0 timings for 
 PIO1...

Reminds about a need to fix PIO1 in -speedproc for Intel/SMsC (will do it).

Thanks,
Bart
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-07-03 Thread Alan Cox
  .bootable   = ON_BOARD, \
  .enablebits = { {0x40, 1, 1}, {0x40, 0x10, 0x10} }, \
  +   .pio_mask   = ATA_PIO5, \
  }
 
 Just noticed that this driver does nothing in its tuneproc() method. So, 
 this mask is unrealistic. The method needs to be dropped for now along with 
 config-jmicron_chipset_for_pio() 

It doesn't need to do anything. 
-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 9/15] ide: add PIO masks

2007-06-30 Thread Jeff Garzik

Bartlomiej Zolnierkiewicz wrote:

* Add ATA_PIO[0-6] defines to linux/ata.h.


ACK


-
To unsubscribe from this list: send the line unsubscribe linux-ide in
the body of a message to [EMAIL PROTECTED]
More majordomo info at  http://vger.kernel.org/majordomo-info.html