libata: fixes regarding configuration
PATCH 1/1 libata: fixes regarding configuration
Hello, guys.
These are five small fix / cleanup patches regarding device configuration. These are against
upstream-2.6.17 (7db74a4780cf9cc6b2ea97582cdc8031d5f22ccd)
+ various fixes related to EH patchset [1]
+ three AHCI updates [2][3][4]
+ new reset mechanism patchset [5]
Except for #2, all deal with making per-dev configuration per-dev instead of per-port. These are largely in preparation for soon-to-be-posted ata_dev_configure/revalidate patchset.
[1] http://marc.theaimsgroup.com/?l=linux-ide&m=113798939526779&w=2
[2] http://marc.theaimsgroup.com/?l=linux-ide&m=113800194919594&w=2
[3] http://marc.theaimsgroup.com/?l=linux-ide&m=113800459922438&w=2
[4] http://marc.theaimsgroup.com/?l=linux-ide&m=113804195925385&w=2
[5] http://marc.theaimsgroup.com/?l=linux-ide&m=113809002924734&w=2
--
tejun
PATCH 1/5 libata: make ata_dev_knobble() per-device
ata_dev_knobble() unconditionally used the first device of the port to determine whether a device is bridged or not. This causes bridge limit to be incorrectly applied or unapplied for hosts with slave devices (e.g. ata_piix).
---
drivers/scsi/libata-core.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
315dd661a46e94e44c6f9481465bac93f8ea84ef
drivers/scsi/libata-core.c +5 -4
@@ -1483,9 +1483,10 @@ err_out: } -static inline u8 ata_dev_knobble (const struct ata_port *ap) +static inline u8 ata_dev_knobble (const struct ata_port *ap, +struct ata_device *dev) { -return ((ap->cbl ==ATA_CBL_SATA ) && (!ata_id_is_sata (ap->device->id))); +return ((ap->cbl ==ATA_CBL_SATA ) && (!ata_id_is_sata (dev->id))); }/**
@@ -1500,9 +1501,9 @@ static inline u8 ata_dev_knobble(const svoid ata_dev_config (struct ata_port *ap,unsigned int i) {/* limit bridge transfers to udma5, 200 sectors */ -if (ata_dev_knobble (ap)) { +if (ata_dev_knobble (ap, &ap->device[i])) {printk (KERN_INFO "ata%u(%u): applying bridge limits\n" , - ap->id, ap->device->devno); + ap->id, i); ap->udma_mask &=ATA_UDMA5 ; ap->host->max_sectors =ATA_MAX_SECTORS ; ap->host->hostt->max_sectors =ATA_MAX_SECTORS ;
Signature · 1 line
1.1.3
PATCH 2/5 libata: don't do EDD handling if ->probe_reset is used
In reply to Tejun HeoEDD is never used with ->probe_reset. Don't handle EDD special case in ata_dev_identify if ->probe_reset is in use.
---
drivers/scsi/libata-core.c | 3 ++- 1 files changed, 2 insertions(+), 1 deletions(-)
d759ca5b17e448ffa7e91143b754513d5f7f338b
drivers/scsi/libata-core.c +2 -1
@@ -1294,7 +1294,8 @@ static void ata_dev_identify(struct ata_return ; } -if (ap->flags & (ATA_FLAG_SRST |ATA_FLAG_SATA_RESET )) +if (ap->ops->probe_reset || + ap->flags & (ATA_FLAG_SRST |ATA_FLAG_SATA_RESET )) using_edd =0 ;else using_edd =1 ;
Signature · 1 line
1.1.3
PATCH 3/5 libata: move cdb_len for host to device
In reply to Tejun Heocdb_len is per-device property. Sharing cdb_len on ap results in inaccurate configuration on revalidation and hotplugging. This patch makes cdb_len per-device.
---
drivers/scsi/ahci.c | 3 ++- drivers/scsi/libata-core.c | 19 ++++++++++++------- drivers/scsi/libata-scsi.c | 4 ++-- drivers/scsi/sata_sil24.c | 4 ++-- include/linux/libata.h | 2 +- 5 files changed, 19 insertions(+), 13 deletions(-)
c9eb7c877e51bac65b1c0a65334f6108f085b952
drivers/scsi/ahci.c +2 -1
@@ -745,7 +745,8 @@ static void ahci_qc_prep(struct ata_queuata_tf_to_fis (&qc->tf, pp->cmd_tbl,0 );if (is_atapi) {memset (pp->cmd_tbl +AHCI_CMD_TBL_CDB ,0 ,32 ); -memcpy (pp->cmd_tbl +AHCI_CMD_TBL_CDB , qc->cdb, ap->cdb_len); +memcpy (pp->cmd_tbl +AHCI_CMD_TBL_CDB , qc->cdb, + qc->dev->cdb_len); } n_elem =0 ;
drivers/scsi/libata-core.c +12 -7
@@ -1286,7 +1286,7 @@ static void ata_dev_identify(struct ata_unsigned int using_edd;struct ata_taskfile tf;unsigned int err_mask; -int rc; +int i, rc;if (!ata_dev_present (dev)) { DPRINTK("ENTER/EXIT (host %u, dev %u) -- nodev\n",
@@ -1450,7 +1450,7 @@ retry: } - ap->host->max_cmd_len =16 ; + dev->cdb_len =16 ; }/* ATAPI-specific feature tests */
@@ -1463,8 +1463,7 @@ retry:printk (KERN_WARNING "ata%u: unsupported CDB len\n" , ap->id); goto err_out_nosup; } - ap->cdb_len = (unsigned int ) rc; - ap->host->max_cmd_len = (unsigned char ) ap->cdb_len; + dev->cdb_len = (unsigned int ) rc;/* print device info to dmesg */ printk(KERN_INFO "ata%u: dev %u ATAPI, max %s\n",
@@ -1472,6 +1471,12 @@ retry: ata_mode_string(xfer_modes)); } + ap->host->max_cmd_len =0 ; +for (i =0 ; i <ATA_MAX_DEVICES ; i++) + ap->host->max_cmd_len = max_t(unsigned int, + ap->host->max_cmd_len, + ap->device[i].cdb_len); +DPRINTK ("EXIT, drv_stat = 0x%x\n" ,ata_chk_status (ap));return ;
@@ -4529,7 +4534,7 @@ static void atapi_packet_task(void *_dat/* send SCSI cdb */ DPRINTK ("send cdb\n" ); -assert (ap->cdb_len >=12 ); +assert (qc->dev->cdb_len >=12 );if (qc->tf.protocol ==ATA_PROT_ATAPI_DMA || qc->tf.protocol ==ATA_PROT_ATAPI_NODATA ) {
@@ -4543,12 +4548,12 @@ static void atapi_packet_task(void *_dat*/ spin_lock_irqsave (&ap->host_set->lock, flags); ap->flags &= ~ATA_FLAG_NOINTR ; -ata_data_xfer (ap, qc->cdb, ap->cdb_len,1 ); +ata_data_xfer (ap, qc->cdb, qc->dev->cdb_len,1 );if (qc->tf.protocol ==ATA_PROT_ATAPI_DMA ) ap->ops->bmdma_start (qc);/* initiate bmdma */ spin_unlock_irqrestore (&ap->host_set->lock, flags); }else { -ata_data_xfer (ap, qc->cdb, ap->cdb_len,1 ); +ata_data_xfer (ap, qc->cdb, qc->dev->cdb_len,1 );/* PIO commands are handled by polling */ ap->hsm_task_state =HSM_ST ;
drivers/scsi/libata-scsi.c +2 -2
@@ -2113,7 +2113,7 @@ static void atapi_request_sense(struct aata_sg_init_one (qc, cmd->sense_buffer,sizeof (cmd->sense_buffer)); qc->dma_dir =DMA_FROM_DEVICE ; -memset (&qc->cdb,0 , ap->cdb_len); +memset (&qc->cdb,0 , qc->dev->cdb_len); qc->cdb[0 ] =REQUEST_SENSE ; qc->cdb[4 ] =SCSI_SENSE_BUFFERSIZE ;
@@ -2215,7 +2215,7 @@ static unsigned int atapi_xlat(struct atif (ata_check_atapi_dma (qc)) using_pio =1 ; -memcpy (&qc->cdb, scsicmd, qc->ap->cdb_len); +memcpy (&qc->cdb, scsicmd, qc->dev->cdb_len); qc->complete_fn = atapi_qc_complete;
drivers/scsi/sata_sil24.c +2 -2
@@ -370,7 +370,7 @@ static void sil24_dev_config(struct ata_ {void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; -if (ap->cdb_len ==16 ) +if (dev->cdb_len ==16 )writel (PORT_CS_CDB16 , port +PORT_CTRL_STAT );else writel (PORT_CS_CDB16 , port +PORT_CTRL_CLR );
@@ -541,7 +541,7 @@ static void sil24_qc_prep(struct ata_que prb = &cb->atapi.prb; sge = cb->atapi.sge;memset (cb->atapi.cdb,0 ,32 ); -memcpy (cb->atapi.cdb, qc->cdb, ap->cdb_len); +memcpy (cb->atapi.cdb, qc->cdb, qc->dev->cdb_len);if (qc->tf.protocol !=ATA_PROT_ATAPI_NODATA ) {if (qc->tf.flags &ATA_TFLAG_WRITE )
include/linux/libata.h +1 -1
@@ -356,6 +356,7 @@ struct ata_device {unsigned int multi_count;/* sectors count for READ/WRITE MULTIPLE */ +unsigned int cdb_len;/* for CHS addressing */ u16 cylinders;/* Number of cylinders */
@@ -385,7 +386,6 @@ struct ata_port {unsigned int mwdma_mask;unsigned int udma_mask;unsigned int cbl;/* cable type; ATA_CBL_xxx */ -unsigned int cdb_len;struct ata_device device[ATA_MAX_DEVICES ];
Signature · 1 line
1.1.3
PATCH 4/5 libata: add per-device max_sectors
In reply to Tejun HeoIf a low level driver wants to control max_sectors, it had to adjust ap->host->max_sectors and set ATA_DFLAG_LOCK_SECTORS to tell ata_scsi_slave_config not to override the limit. This is not only cumbersome but also incorrect for hosts which support more than one devices per port.
This patch adds per-device ->max_sectors. If the field is unset (zero), libata core layer will adjust ->max_sectors according to default rules. If the field is set, libata honors the setting.
---
drivers/scsi/libata-core.c | 4 +--- drivers/scsi/libata-scsi.c | 18 +++++++++--------- drivers/scsi/sata_sil.c | 4 +--- include/linux/libata.h | 4 ++-- 4 files changed, 13 insertions(+), 17 deletions(-)
d1a4f7e13eb3dbc87f2970dc25cf0b6ee267f6ce
drivers/scsi/libata-core.c +1 -3
@@ -1511,9 +1511,7 @@ void ata_dev_config(struct ata_port *ap,printk (KERN_INFO "ata%u(%u): applying bridge limits\n" , ap->id, i); ap->udma_mask &=ATA_UDMA5 ; - ap->host->max_sectors =ATA_MAX_SECTORS ; - ap->host->hostt->max_sectors =ATA_MAX_SECTORS ; - ap->device[i].flags |=ATA_DFLAG_LOCK_SECTORS ; + ap->device[i].max_sectors =ATA_MAX_SECTORS ; }if (ap->ops->dev_config)
drivers/scsi/libata-scsi.c +9 -9
@@ -684,23 +684,23 @@ int ata_scsi_slave_config(struct scsi_deif (sdev->id <ATA_MAX_DEVICES ) {struct ata_port *ap;struct ata_device *dev; +unsigned int max_sectors; ap = (struct ata_port *) &sdev->host->hostdata[0 ]; dev = &ap->device[sdev->id]; -/* TODO: 1024 is an arbitrary number, not the +/* TODO: 2048 is an arbitrary number, not the * hardware maximum. This should be increased to * 65534 when Jens Axboe's patch for dynamically * determining max_sectors is merged. */ -if ((dev->flags &ATA_DFLAG_LBA48 ) && - ((dev->flags &ATA_DFLAG_LOCK_SECTORS ) ==0 )) { -/* -* do not overwrite sdev->host->max_sectors, since -* other drives on this host may not support LBA48 -*/ -blk_queue_max_sectors (sdev->request_queue,2048 ); - } + max_sectors =ATA_MAX_SECTORS ; +if (dev->flags &ATA_DFLAG_LBA48 ) + max_sectors =2048 ; +if (dev->max_sectors) + max_sectors = dev->max_sectors; + +blk_queue_max_sectors (sdev->request_queue, max_sectors);/* * SATA DMA transfers must be multiples of 4 byte, so
drivers/scsi/sata_sil.c +1 -3
@@ -356,9 +356,7 @@ static void sil_dev_config(struct ata_poif ((ap->flags &SIL_FLAG_MOD15WRITE ) && (quirks &SIL_QUIRK_MOD15WRITE )) {printk (KERN_INFO "ata%u(%u): applying Seagate errata fix\n" , ap->id, dev->devno); - ap->host->max_sectors =15 ; - ap->host->hostt->max_sectors =15 ; - dev->flags |=ATA_DFLAG_LOCK_SECTORS ; + dev->max_sectors =15 ;return ; }
include/linux/libata.h +2 -2
@@ -132,8 +132,7 @@ enum {/* struct ata_device stuff */ ATA_DFLAG_LBA48 = (1 <<0 ),/* device supports LBA48 */ ATA_DFLAG_PIO = (1 <<1 ),/* device currently in PIO mode */ -ATA_DFLAG_LOCK_SECTORS = (1 <<2 ),/* don't adjust max_sectors */ -ATA_DFLAG_LBA = (1 <<3 ),/* device supports LBA */ +ATA_DFLAG_LBA = (1 <<2 ),/* device supports LBA */ ATA_DEV_UNKNOWN =0 ,/* unknown device */ ATA_DEV_ATA = 1, /* ATA device */
@@ -356,6 +355,7 @@ struct ata_device {unsigned int multi_count;/* sectors count for READ/WRITE MULTIPLE */ +unsigned int max_sectors;/* per-device max sectors */ unsigned int cdb_len;/* for CHS addressing */
Signature · 1 line
1.1.3
PATCH 5/5 libata: kill sht->max_sectors
In reply to Tejun HeoThe previous dev->max_sectors patch made sht->max_sectors meaningless. Kill all initializations of sht->max_sectors.
---
drivers/scsi/ahci.c | 1 - drivers/scsi/ata_piix.c | 1 - drivers/scsi/pdc_adma.c | 1 - drivers/scsi/sata_mv.c | 1 - drivers/scsi/sata_nv.c | 1 - drivers/scsi/sata_promise.c | 1 - drivers/scsi/sata_qstor.c | 1 - drivers/scsi/sata_sil.c | 1 - drivers/scsi/sata_sil24.c | 1 - drivers/scsi/sata_sis.c | 1 - drivers/scsi/sata_svw.c | 1 - drivers/scsi/sata_sx4.c | 1 - drivers/scsi/sata_uli.c | 1 - drivers/scsi/sata_via.c | 1 - drivers/scsi/sata_vsc.c | 1 - 15 files changed, 0 insertions(+), 15 deletions(-)
6b496aa47c50e4586ac1b1a20ab1d28667a91139
drivers/scsi/ahci.c +0 -1
@@ -210,7 +210,6 @@ static struct scsi_host_template ahci_sh .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = AHCI_MAX_SG, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = AHCI_USE_CLUSTERING,
drivers/scsi/ata_piix.c +0 -1
@@ -182,7 +182,6 @@ static struct scsi_host_template piix_sh .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/pdc_adma.c +0 -1
@@ -147,7 +147,6 @@ static struct scsi_host_template adma_at .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ENABLE_CLUSTERING,
drivers/scsi/sata_mv.c +0 -1
@@ -366,7 +366,6 @@ static struct scsi_host_template mv_sht .can_queue = MV_USE_Q_DEPTH, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = MV_MAX_SG_CT / 2, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_nv.c +0 -1
@@ -233,7 +233,6 @@ static struct scsi_host_template nv_sht .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_promise.c +0 -1
@@ -107,7 +107,6 @@ static struct scsi_host_template pdc_ata .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_qstor.c +0 -1
@@ -136,7 +136,6 @@ static struct scsi_host_template qs_ata_ .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = QS_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED,//FIXME .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_sil.c +0 -1
@@ -139,7 +139,6 @@ static struct scsi_host_template sil_sht .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_sil24.c +0 -1
@@ -284,7 +284,6 @@ static struct scsi_host_template sil24_s .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_sis.c +0 -1
@@ -91,7 +91,6 @@ static struct scsi_host_template sis_sht .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = ATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_svw.c +0 -1
@@ -292,7 +292,6 @@ static struct scsi_host_template k2_sata .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_sx4.c +0 -1
@@ -186,7 +186,6 @@ static struct scsi_host_template pdc_sat .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_uli.c +0 -1
@@ -79,7 +79,6 @@ static struct scsi_host_template uli_sht .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_via.c +0 -1
@@ -98,7 +98,6 @@ static struct scsi_host_template svia_sh .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
drivers/scsi/sata_vsc.c +0 -1
@@ -227,7 +227,6 @@ static struct scsi_host_template vsc_sat .can_queue = ATA_DEF_QUEUE, .this_id = ATA_SHT_THIS_ID, .sg_tablesize = LIBATA_MAX_PRD, - .max_sectors = ATA_MAX_SECTORS, .cmd_per_lun = ATA_SHT_CMD_PER_LUN, .emulated = ATA_SHT_EMULATED, .use_clustering = ATA_SHT_USE_CLUSTERING,
Signature · 1 line
1.1.3
Re: [PATCH 2/5] libata: don't do EDD handling if ->probe_reset is used
In reply to Tejun HeoQuoted 4 lines · Tejun Heo
EDD is never used with ->probe_reset. Don't handle EDD special case in
ata_dev_identifyif ->probe_reset is in use.Signed-off-by Tejun Heo <[email protected]>
Nobody uses EDD, we might as well just remove it completely.
Jeff
Re: [PATCH 1/5] libata: make ata_dev_knobble() per-device
In reply to Tejun HeoQuoted 31 lines · Tejun Heo
ata_dev_knobble()unconditionally used the first device of the port to determine whether a device is bridged or not. This causes bridge limit to be incorrectly applied or unapplied for hosts with slave devices (e.g.ata_piix).Signed-off-by Tejun Heo <[email protected]>---
drivers/scsi/libata-core.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-)
315dd661a46e94e44c6f9481465bac93f8ea84efdrivers/scsi/libata-core.c +3
-2@@ -1483,9 +1483,10 @@ err_out: } -static inline u8 ata_dev_knobble (const struct ata_port *ap) +static inline u8 ata_dev_knobble (const struct ata_port *ap, +struct ata_device *dev) { -return ((ap->cbl ==ATA_CBL_SATA ) && (!ata_id_is_sata (ap->device->id))); +return ((ap->cbl ==ATA_CBL_SATA ) && (!ata_id_is_sata (dev->id))); }/**
drivers/scsi/libata-core.c static inline u8 ata_dev_knobble(const s · line 1506
Quoted 8 lines
drivers/scsi/libata-core.c +2
-2@@ -1500,9 +1501,9 @@ static inline u8 ata_dev_knobble(const svoid ata_dev_config (struct ata_port *ap,unsigned int i) {/* limit bridge transfers to udma5, 200 sectors */ -if (ata_dev_knobble (ap)) { +if (ata_dev_knobble (ap, &ap->device[i])) {printk (KERN_INFO "ata%u(%u): applying bridge limits\n" , - ap->id, ap->device->devno); + ap->id, i);
patch is OK, but at the same time you should
1) remove the inline, its out of fashion
2) make ata_dev_knobble() return [machine] int rather than u8. It's really just a bool.
BTW, if you were bored one day, it would be nice to figure out how to use gcc's [and C99's] bool type for stuff like this.
Re: [PATCH 3/5] libata: move cdb_len for host to device
In reply to Tejun HeoQuoted 5 lines · Tejun Heo
cdb_lenis per-device property. Sharingcdb_lenon ap results in inaccurate configuration on revalidation and hotplugging. This patch makescdb_lenper-device.Signed-off-by Tejun Heo <[email protected]>
ACK patches 3-5, but not applied due to previous 2 patches not being applied