linux-ide.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix
@ 2005-02-24  7:12 Albert Lee
  2005-02-24  7:44 ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Albert Lee @ 2005-02-24  7:12 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: IDE Linux

Jeff,

Attached please find the split ata_scsi_verify_xlat() fix.

Change:
  - Fix uninitialized tf->command bug in ata_scsi_verify_xlat(), introduced by my previous CHS support patch.
    (This is similar to http://marc.theaimsgroup.com/?l=linux-ide&m=110735039505617&w=2)
  - Fix comment wording.

The patch is against libata-dev-2.6 tree for your review.

Albert

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
=============================================================================================
--- libata-dev-2.6/drivers/scsi/libata-scsi.c	2005-02-21 17:23:03.000000000 +0800
+++ libata-dev-2.6-mod/drivers/scsi/libata-scsi.c	2005-02-22 18:32:19.000000000 +0800
@@ -785,6 +785,7 @@
  		if ((cyl >> 16) || (head >> 4) || (sect >> 8) || (!sect))
  			return 1;
  		
+		tf->command = ATA_CMD_VERIFY;
  		tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */
  		tf->lbal = sect;
  		tf->lbam = cyl;
@@ -875,7 +876,7 @@

  	/* Check and compose ATA command */
  	if (!n_block)
-		/* In ATA, sector count 0 are 256 or 65536 sectors, not 0 sectors. */
+		/* In ATA, sector count 0 means 256 or 65536 sectors, not 0 sectors. */
  		return 1;

  	if (lba) {




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

* Re: [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix
  2005-02-24  7:12 [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix Albert Lee
@ 2005-02-24  7:44 ` Jeff Garzik
  2005-02-25  4:58   ` Albert Lee
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2005-02-24  7:44 UTC (permalink / raw)
  To: Albert Lee; +Cc: IDE Linux

Albert Lee wrote:
> --- libata-dev-2.6/drivers/scsi/libata-scsi.c    2005-02-21 
> 17:23:03.000000000 +0800
> +++ libata-dev-2.6-mod/drivers/scsi/libata-scsi.c    2005-02-22 
> 18:32:19.000000000 +0800
> @@ -785,6 +785,7 @@
>          if ((cyl >> 16) || (head >> 4) || (sect >> 8) || (!sect))
>              return 1;
>         
> +        tf->command = ATA_CMD_VERIFY;
>          tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */
>          tf->lbal = sect;
>          tf->lbam = cyl;
> @@ -875,7 +876,7 @@
> 
>      /* Check and compose ATA command */
>      if (!n_block)
> -        /* In ATA, sector count 0 are 256 or 65536 sectors, not 0 
> sectors. */
> +        /* In ATA, sector count 0 means 256 or 65536 sectors, not 0 
> sectors. */
>          return 1;
> 


Patch looks OK, but does not appear to be diff'd against

	linux-2.6.11-rc4 + CHS support patches

When I try to apply your patch, I get

drivers/scsi/libata-scsi.c 1.68: 1661 lines
drivers/scsi/libata-scsi.c 1.68 -> 1.69: 1661 lines
2 out of 2 hunks FAILED -- saving rejects to file 
drivers/scsi/libata-scsi.c.rej

When I examine your patch, I see that the line numbers are _way_ off:

my code line #622:
        /* In ATA, sector count 0 are 256 or 65536 sectors, not 0 sector

your patch attempts to modify line #875 !!

> @@ -875,7 +876,7 @@
> 
>         /* Check and compose ATA command */
>         if (!n_block)
> -               /* In ATA, sector count 0 are 256 or 65536 sectors, not 0 sector
> s. */
> +               /* In ATA, sector count 0 means 256 or 65536 sectors, not 0 sect


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

* Re: [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix
  2005-02-24  7:44 ` Jeff Garzik
@ 2005-02-25  4:58   ` Albert Lee
  2005-02-25  5:28     ` Jeff Garzik
  0 siblings, 1 reply; 5+ messages in thread
From: Albert Lee @ 2005-02-25  4:58 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: IDE Linux



Jeff Garzik wrote:
> 
> Patch looks OK, but does not appear to be diff'd against
> 
>     linux-2.6.11-rc4 + CHS support patches
> 
> When I try to apply your patch, I get
> 
> drivers/scsi/libata-scsi.c 1.68: 1661 lines
> drivers/scsi/libata-scsi.c 1.68 -> 1.69: 1661 lines
> 2 out of 2 hunks FAILED -- saving rejects to file 
> drivers/scsi/libata-scsi.c.rej
> 
> 
Jeff,

Thanks for the explanation.

I've rediff'ed the patch against 2.6.11-rc5 + C/H/S patches.
Attached please find the revised patch for your review.

Albert

Signed-off-by: Albert Lee <albertcc@tw.ibm.com>
============================================================================================
--- linux-2.6.11-rc5-chs/drivers/scsi/libata-scsi.c	2005-02-25 11:48:23.000000000 +0800
+++ linux-2.6.11-rc5-mod/drivers/scsi/libata-scsi.c	2005-02-25 12:40:05.000000000 +0800
@@ -529,6 +529,7 @@
  		if ((cyl >> 16) || (head >> 4) || (sect >> 8) || (!sect))
  			return 1;
  		
+		tf->command = ATA_CMD_VERIFY;
  		tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */
  		tf->lbal = sect;
  		tf->lbam = cyl;
@@ -619,7 +620,7 @@

  	/* Check and compose ATA command */
  	if (!n_block)
-		/* In ATA, sector count 0 are 256 or 65536 sectors, not 0 sectors. */
+		/* In ATA, sector count 0 means 256 or 65536 sectors, not 0 sectors. */
  		return 1;

  	if (lba) {




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

* Re: [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix
  2005-02-25  4:58   ` Albert Lee
@ 2005-02-25  5:28     ` Jeff Garzik
  2005-02-25  7:52       ` Albert Lee
  0 siblings, 1 reply; 5+ messages in thread
From: Jeff Garzik @ 2005-02-25  5:28 UTC (permalink / raw)
  To: Albert Lee; +Cc: IDE Linux


As far as I can tell, your patches are diff'd correctly.  Yet, they 
still do not apply:

drivers/scsi/libata-scsi.c 1.68: 1661 lines
2 out of 2 hunks FAILED -- saving rejects to file 
drivers/scsi/libata-scsi.c.rej

I do not understand the problem, so I simply applied them by hand.

Thanks for your patience,

	Jeff




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

* Re: [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix
  2005-02-25  5:28     ` Jeff Garzik
@ 2005-02-25  7:52       ` Albert Lee
  0 siblings, 0 replies; 5+ messages in thread
From: Albert Lee @ 2005-02-25  7:52 UTC (permalink / raw)
  To: Jeff Garzik; +Cc: IDE Linux



Jeff Garzik wrote:

> 
> As far as I can tell, your patches are diff'd correctly.  Yet, they 
> still do not apply:
> 
> drivers/scsi/libata-scsi.c 1.68: 1661 lines
> 2 out of 2 hunks FAILED -- saving rejects to file 
> drivers/scsi/libata-scsi.c.rej
> 
> I do not understand the problem, so I simply applied them by hand.
> 

Thanks!

Albert



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

end of thread, other threads:[~2005-02-25  7:52 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-02-24  7:12 [PATCH libata-dev-2.6] ata_scsi_verify_xlat() fix Albert Lee
2005-02-24  7:44 ` Jeff Garzik
2005-02-25  4:58   ` Albert Lee
2005-02-25  5:28     ` Jeff Garzik
2005-02-25  7:52       ` Albert Lee

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).