Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 24797
b: refs/heads/master
c: 00b6f5e
h: refs/heads/master
i:
  24795: 78d45e0
v: v3
  • Loading branch information
Albert Lee authored and Jeff Garzik committed Mar 30, 2006
1 parent dd4a0c4 commit afb9379
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 17efc5f7237995295cbe008828788d187fea3c88
refs/heads/master: 00b6f5e9e04b2186a71a5892640bb2d8e09a030e
14 changes: 8 additions & 6 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,9 @@
#include "libata.h"

static unsigned int ata_dev_init_params(struct ata_port *ap,
struct ata_device *dev);
struct ata_device *dev,
u16 heads,
u16 sectors);
static void ata_set_mode(struct ata_port *ap);
static unsigned int ata_dev_set_xfermode(struct ata_port *ap,
struct ata_device *dev);
Expand Down Expand Up @@ -1156,7 +1158,7 @@ static int ata_dev_read_id(struct ata_port *ap, struct ata_device *dev,
* Some drives were very specific about that exact sequence.
*/
if (ata_id_major_version(id) < 4 || !ata_id_has_lba(id)) {
err_mask = ata_dev_init_params(ap, dev);
err_mask = ata_dev_init_params(ap, dev, id[3], id[6]);
if (err_mask) {
rc = -EIO;
reason = "INIT_DEV_PARAMS failed";
Expand Down Expand Up @@ -2748,16 +2750,16 @@ static unsigned int ata_dev_set_xfermode(struct ata_port *ap,
*/

static unsigned int ata_dev_init_params(struct ata_port *ap,
struct ata_device *dev)
struct ata_device *dev,
u16 heads,
u16 sectors)
{
struct ata_taskfile tf;
unsigned int err_mask;
u16 sectors = dev->id[6];
u16 heads = dev->id[3];

/* Number of sectors per track 1-255. Number of heads 1-16 */
if (sectors < 1 || sectors > 255 || heads < 1 || heads > 16)
return 0;
return AC_ERR_INVALID;

/* set up init dev params taskfile */
DPRINTK("init dev params \n");
Expand Down

0 comments on commit afb9379

Please sign in to comment.