* [PATCHSET] libata: misc preps for configuration reorganization
@ 2006-02-12 13:47 Tejun Heo
2006-02-12 13:47 ` [PATCH 1/5] libata: implement ata_dev_id_c_string() Tejun Heo
` (3 more replies)
0 siblings, 4 replies; 9+ messages in thread
From: Tejun Heo @ 2006-02-12 13:47 UTC (permalink / raw)
To: jgarzik, albertcc, linux-ide; +Cc: htejun
Hello, Jeff.
This patchset is miscellaneous preparations for configuration
regorganization, mostly implementing/separating out small helper
functions. This is part of previously posted 'reorganize configuration
and implement revalidation' patchset[1]. As the patchset was too large,
I've broken it down to four patchsets and this is the first one.
These patches are against the current upstream[2] but should apply over
last few yet uncommitted patches from me[3].
Thanks.
--
tejun
[1] http://article.gmane.org/gmane.linux.ide/7632
[2] bef4a456b8dc8b3638f4d49a25a89e1467da9483
[3] http://article.gmane.org/gmane.linux.ide/7967
http://article.gmane.org/gmane.linux.ide/7968
http://article.gmane.org/gmane.linux.ide/7969
http://article.gmane.org/gmane.linux.ide/7970
http://article.gmane.org/gmane.linux.ide/7971
http://article.gmane.org/gmane.linux.ide/7972
^ permalink raw reply [flat|nested] 9+ messages in thread* [PATCH 1/5] libata: implement ata_dev_id_c_string() 2006-02-12 13:47 [PATCHSET] libata: misc preps for configuration reorganization Tejun Heo @ 2006-02-12 13:47 ` Tejun Heo 2006-02-12 19:25 ` Jeff Garzik 2006-02-12 13:47 ` [PATCH 4/5] libata: separate out ata_id_major_version() Tejun Heo ` (2 subsequent siblings) 3 siblings, 1 reply; 9+ messages in thread From: Tejun Heo @ 2006-02-12 13:47 UTC (permalink / raw) To: jgarzik, albertcc, linux-ide; +Cc: Tejun Heo ata_dev_id_c_string() reads ATA string from the specified offset of the given IDENTIFY PAGE and puts it in the specified buffer in trimmed and NULL-terminated form. The caller must supply a buffer which is one byte larger than the maximum size of the target ID string. Signed-off-by: Tejun Heo <htejun@gmail.com> --- drivers/scsi/libata-core.c | 29 +++++++++++++++++++++++++++++ include/linux/libata.h | 2 ++ 2 files changed, 31 insertions(+), 0 deletions(-) fecf9b72f3395e5c73d303cdd098d39418554a82 diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index cef85e5..ea993eb 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -519,6 +519,34 @@ void ata_dev_id_string(const u16 *id, un } } +/** + * ata_dev_id_c_string - Convert IDENTIFY DEVICE page into C string + * @id: IDENTIFY DEVICE results we will examine + * @s: string into which data is output + * @ofs: offset into identify device page + * @len: length of string to return. must be an odd number. + * + * This function is identical to ata_dev_id_string except that it + * trims trailing spaces and terminates the resulting string with + * null. @len must be actual maximum length (even number) + 1. + * + * LOCKING: + * caller. + */ +void ata_dev_id_c_string(const u16 *id, unsigned char *s, + unsigned int ofs, unsigned int len) +{ + unsigned char *p; + + WARN_ON(!(len & 1)); + + ata_dev_id_string(id, s, ofs, len - 1); + + p = s + strnlen(s, len - 1); + while (p > s && p[-1] == ' ') + p--; + *p = '\0'; +} /** * ata_noop_dev_select - Select device 0/1 on ATA bus @@ -4902,6 +4930,7 @@ EXPORT_SYMBOL_GPL(ata_scsi_release); EXPORT_SYMBOL_GPL(ata_host_intr); EXPORT_SYMBOL_GPL(ata_dev_classify); EXPORT_SYMBOL_GPL(ata_dev_id_string); +EXPORT_SYMBOL_GPL(ata_dev_id_c_string); EXPORT_SYMBOL_GPL(ata_dev_config); EXPORT_SYMBOL_GPL(ata_scsi_simulate); EXPORT_SYMBOL_GPL(ata_eh_qc_complete); diff --git a/include/linux/libata.h b/include/linux/libata.h index 83a1f2e..0853032 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -540,6 +540,8 @@ extern void ata_sg_init(struct ata_queue extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); extern void ata_dev_id_string(const u16 *id, unsigned char *s, unsigned int ofs, unsigned int len); +extern void ata_dev_id_c_string(const u16 *id, unsigned char *s, + unsigned int ofs, unsigned int len); extern void ata_dev_config(struct ata_port *ap, unsigned int i); extern void ata_bmdma_setup (struct ata_queued_cmd *qc); extern void ata_bmdma_start (struct ata_queued_cmd *qc); -- 1.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH 1/5] libata: implement ata_dev_id_c_string() 2006-02-12 13:47 ` [PATCH 1/5] libata: implement ata_dev_id_c_string() Tejun Heo @ 2006-02-12 19:25 ` Jeff Garzik 2006-02-13 1:02 ` [PATCH] libata: rename ata_dev_id_[c_]string() Tejun Heo 0 siblings, 1 reply; 9+ messages in thread From: Jeff Garzik @ 2006-02-12 19:25 UTC (permalink / raw) To: Tejun Heo; +Cc: albertcc, linux-ide Tejun Heo wrote: > ata_dev_id_c_string() reads ATA string from the specified offset of > the given IDENTIFY PAGE and puts it in the specified buffer in trimmed > and NULL-terminated form. The caller must supply a buffer which is > one byte larger than the maximum size of the target ID string. > > Signed-off-by: Tejun Heo <htejun@gmail.com> applied 1-5, though I think ata_dev_id_c_string() is beginning to become a long function name. Jeff ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH] libata: rename ata_dev_id_[c_]string() 2006-02-12 19:25 ` Jeff Garzik @ 2006-02-13 1:02 ` Tejun Heo 2006-02-15 2:00 ` Tejun Heo 2006-02-20 9:54 ` Jeff Garzik 0 siblings, 2 replies; 9+ messages in thread From: Tejun Heo @ 2006-02-13 1:02 UTC (permalink / raw) To: Jeff Garzik; +Cc: albertcc, linux-ide This patch renames ata_dev_id_[c_]string() to ata_id_[c_]string(). All other functions which read data from ATA ID data start with ata_id and those two function names were getting too long. Signed-off-by: Tejun Heo <htejun@gmail.com> --- drivers/scsi/libata-core.c | 23 +++++++++++------------ drivers/scsi/libata-scsi.c | 12 ++++++------ drivers/scsi/sata_sil.c | 3 +-- include/linux/libata.h | 8 ++++---- 4 files changed, 22 insertions(+), 24 deletions(-) diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 61cba39..28d4606 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -486,7 +486,7 @@ ata_dev_try_classify(struct ata_port *ap } /** - * ata_dev_id_string - Convert IDENTIFY DEVICE page into string + * ata_id_string - Convert IDENTIFY DEVICE page into string * @id: IDENTIFY DEVICE results we will examine * @s: string into which data is output * @ofs: offset into identify device page @@ -500,8 +500,8 @@ ata_dev_try_classify(struct ata_port *ap * caller. */ -void ata_dev_id_string(const u16 *id, unsigned char *s, - unsigned int ofs, unsigned int len) +void ata_id_string(const u16 *id, unsigned char *s, + unsigned int ofs, unsigned int len) { unsigned int c; @@ -520,27 +520,27 @@ void ata_dev_id_string(const u16 *id, un } /** - * ata_dev_id_c_string - Convert IDENTIFY DEVICE page into C string + * ata_id_c_string - Convert IDENTIFY DEVICE page into C string * @id: IDENTIFY DEVICE results we will examine * @s: string into which data is output * @ofs: offset into identify device page * @len: length of string to return. must be an odd number. * - * This function is identical to ata_dev_id_string except that it + * This function is identical to ata_id_string except that it * trims trailing spaces and terminates the resulting string with * null. @len must be actual maximum length (even number) + 1. * * LOCKING: * caller. */ -void ata_dev_id_c_string(const u16 *id, unsigned char *s, - unsigned int ofs, unsigned int len) +void ata_id_c_string(const u16 *id, unsigned char *s, + unsigned int ofs, unsigned int len) { unsigned char *p; WARN_ON(!(len & 1)); - ata_dev_id_string(id, s, ofs, len - 1); + ata_id_string(id, s, ofs, len - 1); p = s + strnlen(s, len - 1); while (p > s && p[-1] == ' ') @@ -2315,8 +2315,7 @@ static int ata_dma_blacklisted(const str unsigned char model_num[41]; int i; - ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, - sizeof(model_num)); + ata_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num)); for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) if (!strcmp(ata_dma_blacklist[i], model_num)) @@ -4933,8 +4932,8 @@ EXPORT_SYMBOL_GPL(ata_scsi_slave_config) EXPORT_SYMBOL_GPL(ata_scsi_release); EXPORT_SYMBOL_GPL(ata_host_intr); EXPORT_SYMBOL_GPL(ata_dev_classify); -EXPORT_SYMBOL_GPL(ata_dev_id_string); -EXPORT_SYMBOL_GPL(ata_dev_id_c_string); +EXPORT_SYMBOL_GPL(ata_id_string); +EXPORT_SYMBOL_GPL(ata_id_c_string); EXPORT_SYMBOL_GPL(ata_dev_config); EXPORT_SYMBOL_GPL(ata_scsi_simulate); EXPORT_SYMBOL_GPL(ata_eh_qc_complete); diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 86da465..538784e 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -1567,8 +1567,8 @@ unsigned int ata_scsiop_inq_std(struct a if (buflen > 35) { memcpy(&rbuf[8], "ATA ", 8); - ata_dev_id_string(args->id, &rbuf[16], ATA_ID_PROD_OFS, 16); - ata_dev_id_string(args->id, &rbuf[32], ATA_ID_FW_REV_OFS, 4); + ata_id_string(args->id, &rbuf[16], ATA_ID_PROD_OFS, 16); + ata_id_string(args->id, &rbuf[32], ATA_ID_FW_REV_OFS, 4); if (rbuf[32] == 0 || rbuf[32] == ' ') memcpy(&rbuf[32], "n/a ", 4); } @@ -1642,8 +1642,8 @@ unsigned int ata_scsiop_inq_80(struct at memcpy(rbuf, hdr, sizeof(hdr)); if (buflen > (ATA_SERNO_LEN + 4 - 1)) - ata_dev_id_string(args->id, (unsigned char *) &rbuf[4], - ATA_ID_SERNO_OFS, ATA_SERNO_LEN); + ata_id_string(args->id, (unsigned char *) &rbuf[4], + ATA_ID_SERNO_OFS, ATA_SERNO_LEN); return 0; } @@ -1806,8 +1806,8 @@ static int ata_dev_supports_fua(u16 *id) if (!ata_id_has_fua(id)) return 0; - ata_dev_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); - ata_dev_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); + ata_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); + ata_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); if (strcmp(model, "Maxtor")) return 1; diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index 1534688..e14ed4e 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -338,8 +338,7 @@ static void sil_dev_config(struct ata_po unsigned int n, quirks = 0; unsigned char model_num[41]; - ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, - sizeof(model_num)); + ata_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, sizeof(model_num)); for (n = 0; sil_blacklist[n].product; n++) if (!strcmp(sil_blacklist[n].product, model_num)) { diff --git a/include/linux/libata.h b/include/linux/libata.h index afe4645..0d6bf50 100644 --- a/include/linux/libata.h +++ b/include/linux/libata.h @@ -538,10 +538,10 @@ extern void ata_sg_init_one(struct ata_q extern void ata_sg_init(struct ata_queued_cmd *qc, struct scatterlist *sg, unsigned int n_elem); extern unsigned int ata_dev_classify(const struct ata_taskfile *tf); -extern void ata_dev_id_string(const u16 *id, unsigned char *s, - unsigned int ofs, unsigned int len); -extern void ata_dev_id_c_string(const u16 *id, unsigned char *s, - unsigned int ofs, unsigned int len); +extern void ata_id_string(const u16 *id, unsigned char *s, + unsigned int ofs, unsigned int len); +extern void ata_id_c_string(const u16 *id, unsigned char *s, + unsigned int ofs, unsigned int len); extern void ata_dev_config(struct ata_port *ap, unsigned int i); extern void ata_bmdma_setup (struct ata_queued_cmd *qc); extern void ata_bmdma_start (struct ata_queued_cmd *qc); ^ permalink raw reply related [flat|nested] 9+ messages in thread
* Re: [PATCH] libata: rename ata_dev_id_[c_]string() 2006-02-13 1:02 ` [PATCH] libata: rename ata_dev_id_[c_]string() Tejun Heo @ 2006-02-15 2:00 ` Tejun Heo 2006-02-20 9:54 ` Jeff Garzik 1 sibling, 0 replies; 9+ messages in thread From: Tejun Heo @ 2006-02-15 2:00 UTC (permalink / raw) To: Tejun Heo; +Cc: Jeff Garzik, albertcc, linux-ide Tejun Heo wrote: > This patch renames ata_dev_id_[c_]string() to ata_id_[c_]string(). > All other functions which read data from ATA ID data start with ata_id > and those two function names were getting too long. > Jeff, can you ACK or NACK it? So I can base following patches accordingly. BTW, thanks a lot for the prompt reviews! :-) -- tejun ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: [PATCH] libata: rename ata_dev_id_[c_]string() 2006-02-13 1:02 ` [PATCH] libata: rename ata_dev_id_[c_]string() Tejun Heo 2006-02-15 2:00 ` Tejun Heo @ 2006-02-20 9:54 ` Jeff Garzik 1 sibling, 0 replies; 9+ messages in thread From: Jeff Garzik @ 2006-02-20 9:54 UTC (permalink / raw) To: Tejun Heo; +Cc: albertcc, linux-ide Tejun Heo wrote: > This patch renames ata_dev_id_[c_]string() to ata_id_[c_]string(). > All other functions which read data from ATA ID data start with ata_id > and those two function names were getting too long. > > Signed-off-by: Tejun Heo <htejun@gmail.com> applied ^ permalink raw reply [flat|nested] 9+ messages in thread
* [PATCH 4/5] libata: separate out ata_id_major_version() 2006-02-12 13:47 [PATCHSET] libata: misc preps for configuration reorganization Tejun Heo 2006-02-12 13:47 ` [PATCH 1/5] libata: implement ata_dev_id_c_string() Tejun Heo @ 2006-02-12 13:47 ` Tejun Heo 2006-02-12 13:47 ` [PATCH 2/5] libata: use ata_dev_id_c_string() Tejun Heo 2006-02-12 13:47 ` [PATCH 5/5] libata: make ata_dump_id() take @id instead of @dev Tejun Heo 3 siblings, 0 replies; 9+ messages in thread From: Tejun Heo @ 2006-02-12 13:47 UTC (permalink / raw) To: jgarzik, albertcc, linux-ide; +Cc: Tejun Heo Separate out ATA major version calculation from ata_dev_identify() into ata_id_major_version(). It's preparation for splitting ata_dev_identify(). Signed-off-by: Tejun Heo <htejun@gmail.com> --- drivers/scsi/libata-core.c | 6 +----- include/linux/ata.h | 10 ++++++++++ 2 files changed, 11 insertions(+), 5 deletions(-) 66ee6dfccf92daec72aa80724f37f26abfb3352d diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 1fe63ee..7bb99b0 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -927,7 +927,6 @@ static void ata_dev_identify(struct ata_ { struct ata_device *dev = &ap->device[device]; unsigned int major_version; - u16 tmp; unsigned long xfer_modes; unsigned int using_edd; struct ata_taskfile tf; @@ -1030,10 +1029,7 @@ retry: goto err_out_nosup; /* get major version */ - tmp = dev->id[ATA_ID_MAJOR_VER]; - for (major_version = 14; major_version >= 1; major_version--) - if (tmp & (1 << major_version)) - break; + major_version = ata_id_major_version(dev->id); /* * The exact sequence expected by certain pre-ATA4 drives is: diff --git a/include/linux/ata.h b/include/linux/ata.h index a8155ca..b02a16c 100644 --- a/include/linux/ata.h +++ b/include/linux/ata.h @@ -267,6 +267,16 @@ struct ata_taskfile { ((u64) (id)[(n) + 1] << 16) | \ ((u64) (id)[(n) + 0]) ) +static inline unsigned int ata_id_major_version(const u16 *id) +{ + unsigned int mver; + + for (mver = 14; mver >= 1; mver--) + if (id[ATA_ID_MAJOR_VER] & (1 << mver)) + break; + return mver; +} + static inline int ata_id_current_chs_valid(const u16 *id) { /* For ATA-1 devices, if the INITIALIZE DEVICE PARAMETERS command -- 1.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 2/5] libata: use ata_dev_id_c_string() 2006-02-12 13:47 [PATCHSET] libata: misc preps for configuration reorganization Tejun Heo 2006-02-12 13:47 ` [PATCH 1/5] libata: implement ata_dev_id_c_string() Tejun Heo 2006-02-12 13:47 ` [PATCH 4/5] libata: separate out ata_id_major_version() Tejun Heo @ 2006-02-12 13:47 ` Tejun Heo 2006-02-12 13:47 ` [PATCH 5/5] libata: make ata_dump_id() take @id instead of @dev Tejun Heo 3 siblings, 0 replies; 9+ messages in thread From: Tejun Heo @ 2006-02-12 13:47 UTC (permalink / raw) To: jgarzik, albertcc, linux-ide; +Cc: Tejun Heo Use ata_dev_id_c_string() Signed-off-by: Tejun Heo <htejun@gmail.com> --- drivers/scsi/libata-core.c | 18 ++++-------------- drivers/scsi/libata-scsi.c | 11 ++++------- drivers/scsi/sata_sil.c | 21 ++++++--------------- 3 files changed, 14 insertions(+), 36 deletions(-) 8a77e02188b54b55a3d58426e18a6295a2d46f1b diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index ea993eb..cb770cb 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -2298,24 +2298,14 @@ static const char * const ata_dma_blackl static int ata_dma_blacklisted(const struct ata_device *dev) { - unsigned char model_num[40]; - char *s; - unsigned int len; + unsigned char model_num[41]; int i; - ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS, - sizeof(model_num)); - s = &model_num[0]; - len = strnlen(s, sizeof(model_num)); - - /* ATAPI specifies that empty space is blank-filled; remove blanks */ - while ((len > 0) && (s[len - 1] == ' ')) { - len--; - s[len] = 0; - } + ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, + sizeof(model_num)); for (i = 0; i < ARRAY_SIZE(ata_dma_blacklist); i++) - if (!strncmp(ata_dma_blacklist[i], s, len)) + if (!strcmp(ata_dma_blacklist[i], model_num)) return 1; return 0; diff --git a/drivers/scsi/libata-scsi.c b/drivers/scsi/libata-scsi.c index 26f07a2..ebd7cf4 100644 --- a/drivers/scsi/libata-scsi.c +++ b/drivers/scsi/libata-scsi.c @@ -1806,15 +1806,12 @@ static int ata_dev_supports_fua(u16 *id) if (!ata_id_has_fua(id)) return 0; - model[40] = '\0'; - fw[8] = '\0'; + ata_dev_id_c_string(id, model, ATA_ID_PROD_OFS, sizeof(model)); + ata_dev_id_c_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw)); - ata_dev_id_string(id, model, ATA_ID_PROD_OFS, sizeof(model) - 1); - ata_dev_id_string(id, fw, ATA_ID_FW_REV_OFS, sizeof(fw) - 1); - - if (strncmp(model, "Maxtor", 6)) + if (strcmp(model, "Maxtor")) return 1; - if (strncmp(fw, "BANC1G10", 8)) + if (strcmp(fw, "BANC1G10")) return 1; return 0; /* blacklisted */ diff --git a/drivers/scsi/sata_sil.c b/drivers/scsi/sata_sil.c index bd28877..61c4ac7 100644 --- a/drivers/scsi/sata_sil.c +++ b/drivers/scsi/sata_sil.c @@ -337,22 +337,13 @@ static void sil_scr_write (struct ata_po static void sil_dev_config(struct ata_port *ap, struct ata_device *dev) { unsigned int n, quirks = 0; - unsigned char model_num[40]; - const char *s; - unsigned int len; - - ata_dev_id_string(dev->id, model_num, ATA_ID_PROD_OFS, - sizeof(model_num)); - s = &model_num[0]; - len = strnlen(s, sizeof(model_num)); - - /* ATAPI specifies that empty space is blank-filled; remove blanks */ - while ((len > 0) && (s[len - 1] == ' ')) - len--; + unsigned char model_num[41]; + + ata_dev_id_c_string(dev->id, model_num, ATA_ID_PROD_OFS, + sizeof(model_num)); for (n = 0; sil_blacklist[n].product; n++) - if (!memcmp(sil_blacklist[n].product, s, - strlen(sil_blacklist[n].product))) { + if (!strcmp(sil_blacklist[n].product, model_num)) { quirks = sil_blacklist[n].quirk; break; } @@ -372,7 +363,7 @@ static void sil_dev_config(struct ata_po /* limit to udma5 */ if (quirks & SIL_QUIRK_UDMA5MAX) { printk(KERN_INFO "ata%u(%u): applying Maxtor errata fix %s\n", - ap->id, dev->devno, s); + ap->id, dev->devno, model_num); ap->udma_mask &= ATA_UDMA5; return; } -- 1.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
* [PATCH 5/5] libata: make ata_dump_id() take @id instead of @dev 2006-02-12 13:47 [PATCHSET] libata: misc preps for configuration reorganization Tejun Heo ` (2 preceding siblings ...) 2006-02-12 13:47 ` [PATCH 2/5] libata: use ata_dev_id_c_string() Tejun Heo @ 2006-02-12 13:47 ` Tejun Heo 3 siblings, 0 replies; 9+ messages in thread From: Tejun Heo @ 2006-02-12 13:47 UTC (permalink / raw) To: jgarzik, albertcc, linux-ide; +Cc: Tejun Heo Make ata_dump_id() take @id instead of @dev. This is preparation for splitting ata_dev_identify(). Signed-off-by: Tejun Heo <htejun@gmail.com> --- drivers/scsi/libata-core.c | 36 ++++++++++++++++++------------------ 1 files changed, 18 insertions(+), 18 deletions(-) 1e6421a8c452cdce9853077482b130f8b228a6a7 diff --git a/drivers/scsi/libata-core.c b/drivers/scsi/libata-core.c index 7bb99b0..9744ed3 100644 --- a/drivers/scsi/libata-core.c +++ b/drivers/scsi/libata-core.c @@ -651,41 +651,41 @@ void ata_dev_select(struct ata_port *ap, /** * ata_dump_id - IDENTIFY DEVICE info debugging output - * @dev: Device whose IDENTIFY DEVICE page we will dump + * @id: IDENTIFY DEVICE page to dump * - * Dump selected 16-bit words from a detected device's - * IDENTIFY PAGE page. + * Dump selected 16-bit words from the given IDENTIFY DEVICE + * page. * * LOCKING: * caller. */ -static inline void ata_dump_id(const struct ata_device *dev) +static inline void ata_dump_id(const u16 *id) { DPRINTK("49==0x%04x " "53==0x%04x " "63==0x%04x " "64==0x%04x " "75==0x%04x \n", - dev->id[49], - dev->id[53], - dev->id[63], - dev->id[64], - dev->id[75]); + id[49], + id[53], + id[63], + id[64], + id[75]); DPRINTK("80==0x%04x " "81==0x%04x " "82==0x%04x " "83==0x%04x " "84==0x%04x \n", - dev->id[80], - dev->id[81], - dev->id[82], - dev->id[83], - dev->id[84]); + id[80], + id[81], + id[82], + id[83], + id[84]); DPRINTK("88==0x%04x " "93==0x%04x\n", - dev->id[88], - dev->id[93]); + id[88], + id[93]); } /* @@ -1019,7 +1019,7 @@ retry: if (!xfer_modes) xfer_modes = ata_pio_modes(dev); - ata_dump_id(dev); + ata_dump_id(dev->id); /* ATA-specific feature tests */ if (dev->class == ATA_DEV_ATA) { @@ -2507,7 +2507,7 @@ static void ata_dev_reread_id(struct ata swap_buf_le16(dev->id, ATA_ID_WORDS); - ata_dump_id(dev); + ata_dump_id(dev->id); DPRINTK("EXIT\n"); -- 1.1.5 ^ permalink raw reply related [flat|nested] 9+ messages in thread
end of thread, other threads:[~2006-02-20 9:54 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2006-02-12 13:47 [PATCHSET] libata: misc preps for configuration reorganization Tejun Heo 2006-02-12 13:47 ` [PATCH 1/5] libata: implement ata_dev_id_c_string() Tejun Heo 2006-02-12 19:25 ` Jeff Garzik 2006-02-13 1:02 ` [PATCH] libata: rename ata_dev_id_[c_]string() Tejun Heo 2006-02-15 2:00 ` Tejun Heo 2006-02-20 9:54 ` Jeff Garzik 2006-02-12 13:47 ` [PATCH 4/5] libata: separate out ata_id_major_version() Tejun Heo 2006-02-12 13:47 ` [PATCH 2/5] libata: use ata_dev_id_c_string() Tejun Heo 2006-02-12 13:47 ` [PATCH 5/5] libata: make ata_dump_id() take @id instead of @dev Tejun Heo
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).