Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 29476
b: refs/heads/master
c: 3ef3b43
h: refs/heads/master
v: v3
  • Loading branch information
Tejun Heo committed May 31, 2006
1 parent dfd88c8 commit 14c5b0c
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 6 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: abdda7331d469fa965167365f011d05e226008fb
refs/heads/master: 3ef3b43d5633d30fa3f033f62094ec2e9c5b8376
26 changes: 21 additions & 5 deletions trunk/drivers/scsi/libata-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -5141,6 +5141,26 @@ static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister)
ap->ops->port_stop(ap);
}

/**
* ata_dev_init - Initialize an ata_device structure
* @dev: Device structure to initialize
*
* Initialize @dev in preparation for probing.
*
* LOCKING:
* Inherited from caller.
*/
void ata_dev_init(struct ata_device *dev)
{
struct ata_port *ap = dev->ap;

memset((void *)dev, 0, sizeof(*dev));
dev->devno = dev - ap->device;
dev->pio_mask = UINT_MAX;
dev->mwdma_mask = UINT_MAX;
dev->udma_mask = UINT_MAX;
}

/**
* ata_host_init - Initialize an ata_port structure
* @ap: Structure to initialize
Expand All @@ -5155,7 +5175,6 @@ static void ata_host_remove(struct ata_port *ap, unsigned int do_unregister)
* LOCKING:
* Inherited from caller.
*/

static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
struct ata_host_set *host_set,
const struct ata_probe_ent *ent, unsigned int port_no)
Expand Down Expand Up @@ -5199,10 +5218,7 @@ static void ata_host_init(struct ata_port *ap, struct Scsi_Host *host,
for (i = 0; i < ATA_MAX_DEVICES; i++) {
struct ata_device *dev = &ap->device[i];
dev->ap = ap;
dev->devno = i;
dev->pio_mask = UINT_MAX;
dev->mwdma_mask = UINT_MAX;
dev->udma_mask = UINT_MAX;
ata_dev_init(dev);
}

#ifdef ATA_IRQ_TRAP
Expand Down
1 change: 1 addition & 0 deletions trunk/drivers/scsi/libata.h
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ extern int ata_check_atapi_dma(struct ata_queued_cmd *qc);
extern void ata_dev_select(struct ata_port *ap, unsigned int device,
unsigned int wait, unsigned int can_sleep);
extern void swap_buf_le16(u16 *buf, unsigned int buf_words);
extern void ata_dev_init(struct ata_device *dev);
extern int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg);
extern int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg);

Expand Down

0 comments on commit 14c5b0c

Please sign in to comment.