diff -urN newtree/block/ll_rw_blk.c newtree.2/block/ll_rw_blk.c --- newtree/block/ll_rw_blk.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/block/ll_rw_blk.c 2006-09-17 09:35:52.000000000 -0400 @@ -40,6 +40,8 @@ static void init_request_from_bio(struct request *req, struct bio *bio); static int __make_request(request_queue_t *q, struct bio *bio); static struct io_context *current_io_context(gfp_t gfp_flags, int node); +static int blk_protect_register(request_queue_t *q); +static void blk_protect_unregister(request_queue_t *q); /* * For the allocated request tables @@ -357,6 +359,18 @@ EXPORT_SYMBOL(blk_queue_issue_flush_fn); +void blk_queue_issue_protect_fn(request_queue_t *q, issue_protect_fn *ipf) +{ + q->issue_protect_fn = ipf; +} +EXPORT_SYMBOL(blk_queue_issue_protect_fn); + +void blk_queue_issue_unprotect_fn(request_queue_t *q, issue_unprotect_fn *iuf) +{ + q->issue_unprotect_fn = iuf; +} +EXPORT_SYMBOL(blk_queue_issue_unprotect_fn); + /* * Cache flushing for ordered writes handling */ @@ -4037,6 +4051,7 @@ return ret; } + blk_protect_register(q); return 0; } @@ -4045,6 +4060,7 @@ request_queue_t *q = disk->queue; if (q && q->request_fn) { + blk_protect_unregister(q); elv_unregister_queue(q); kobject_uevent(&q->kobj, KOBJ_REMOVE); @@ -4052,3 +4068,112 @@ kobject_put(&disk->kobj); } } + +/* + * Restore the unplugging timer that we re-used + * to implement the queue freeze timeout... + */ +static void blk_unfreeze_work(void *data) +{ + request_queue_t *q = (request_queue_t *) data; + + INIT_WORK(&q->unplug_work, blk_unplug_work, q); + q->unplug_timer.function = blk_unplug_timeout; + + q->issue_unprotect_fn(q); +} + +/* + * Called when the queue freeze timeout expires... + */ +static void blk_unfreeze_timeout(unsigned long data) +{ + request_queue_t *q = (request_queue_t *) data; + kblockd_schedule_work(&q->unplug_work); +} + +/* + * The lower level driver parks and freezes the queue, and this block layer + * function sets up the freeze timeout timer on return. If the queue is + * already frozen then this is called to extend the timer... + */ +void blk_freeze_queue(request_queue_t *q, int seconds) +{ + /* set/reset the timer */ + mod_timer(&q->unplug_timer, msecs_to_jiffies(seconds*1000) + jiffies); + + /* we do this every iteration - is this sane? */ + INIT_WORK(&q->unplug_work, blk_unfreeze_work, q); + q->unplug_timer.function = blk_unfreeze_timeout; +} + +/* + * When reading the 'protect' attribute, we return boolean frozen or active + * todo: + * - maybe we should return seconds remaining instead? + */ +static ssize_t queue_protect_show(struct request_queue *q, char *page) +{ + return queue_var_show(blk_queue_stopped(q), (page)); +} + +/* + * When writing the 'protect' attribute, input is the number of seconds + * to freeze the queue for. We call a lower level helper function to + * park the heads and freeze/block the queue, then we make a block layer + * call to setup the thaw timeout. If input is 0, then we thaw the queue. + */ +static ssize_t queue_protect_store(struct request_queue *q, const char *page, size_t count) +{ + unsigned long freeze = 0; + queue_var_store(&freeze, page, count); + + if(freeze>0) { + /* Park and freeze */ + if (!blk_queue_stopped(q)) + q->issue_protect_fn(q); + /* set / reset the thaw timer */ + blk_freeze_queue(q, freeze); + } + else + blk_unfreeze_timeout((unsigned long) q); + + return count; +} + +static struct queue_sysfs_entry queue_protect_entry = { + .attr = {.name = "protect", .mode = S_IRUGO | S_IWUSR }, + .show = queue_protect_show, + .store = queue_protect_store, +}; + +static int blk_protect_register(request_queue_t *q) +{ + int error = 0; + + /* check that the lower level driver has a protect handler */ + if (!q->issue_protect_fn) + return 1; + + /* create the attribute */ + error = sysfs_create_file(&q->kobj, &queue_protect_entry.attr); + if(error){ + printk(KERN_ERR + "blk_protect_register(): failed to create protect queue attribute!\n"); + return error; + } + + kobject_get(&q->kobj); + return 0; +} + +static void blk_protect_unregister(request_queue_t *q) +{ + /* check that the lower level driver has a protect handler */ + if (!q->issue_protect_fn) + return; + + /* remove the attribute */ + sysfs_remove_file(&q->kobj,&queue_protect_entry.attr); + kobject_put(&q->kobj); +} diff -urN newtree/diff newtree.2/diff --- newtree/diff 1969-12-31 19:00:00.000000000 -0500 +++ newtree.2/diff 2006-09-17 09:55:38.000000000 -0400 @@ -0,0 +1,1691 @@ +--- ../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c 2006-09-17 09:51:17.000000000 -0400 ++++ drivers/ata/libata-scsi.c 2006-09-17 09:50:01.000000000 -0400 +@@ -38,9 +38,10 @@ + #include + #include + #include ++#include + #include + #include +-#include ++#include + #include + #include + #include +@@ -51,10 +52,14 @@ + #define SECTOR_SIZE 512 + + typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc, const u8 *scsicmd); +-static struct ata_device * +-ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev); +-static void ata_scsi_error(struct Scsi_Host *host); +-enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd); ++ ++static struct ata_device * __ata_scsi_find_dev(struct ata_port *ap, ++ const struct scsi_device *scsidev); ++static struct ata_device * ata_scsi_find_dev(struct ata_port *ap, ++ const struct scsi_device *scsidev); ++static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, ++ unsigned int id, unsigned int lun); ++ + + #define RW_RECOVERY_MPAGE 0x1 + #define RW_RECOVERY_MPAGE_LEN 12 +@@ -102,6 +107,7 @@ + struct scsi_transport_template ata_scsi_transport_template = { + .eh_strategy_handler = ata_scsi_error, + .eh_timed_out = ata_scsi_timed_out, ++ .user_scan = ata_scsi_user_scan, + }; + + +@@ -216,9 +222,7 @@ + && copy_to_user(arg + sizeof(args), argbuf, argsize)) + rc = -EFAULT; + error: +- if (argbuf) +- kfree(argbuf); +- ++ kfree(argbuf); + return rc; + } + +@@ -304,7 +308,6 @@ + + /** + * ata_scsi_qc_new - acquire new ata_queued_cmd reference +- * @ap: ATA port to which the new command is attached + * @dev: ATA device to which the new command is attached + * @cmd: SCSI command that originated this ATA command + * @done: SCSI command completion function +@@ -318,19 +321,18 @@ + * current command. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Command allocated, or %NULL if none available. + */ +-struct ata_queued_cmd *ata_scsi_qc_new(struct ata_port *ap, +- struct ata_device *dev, ++struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev, + struct scsi_cmnd *cmd, + void (*done)(struct scsi_cmnd *)) + { + struct ata_queued_cmd *qc; + +- qc = ata_qc_new_init(ap, dev); ++ qc = ata_qc_new_init(dev); + if (qc) { + qc->scsicmd = cmd; + qc->scsidone = done; +@@ -395,20 +397,129 @@ + } + } + +-int ata_scsi_device_resume(struct scsi_device *sdev) ++/** ++ * ata_scsi_device_suspend - suspend ATA device associated with sdev ++ * @sdev: the SCSI device to suspend ++ * @mesg: target power management message ++ * ++ * Request suspend EH action on the ATA device associated with ++ * @sdev and wait for the operation to complete. ++ * ++ * LOCKING: ++ * Kernel thread context (may sleep). ++ * ++ * RETURNS: ++ * 0 on success, -errno otherwise. ++ */ ++int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t mesg) + { +- struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; +- struct ata_device *dev = &ap->device[sdev->id]; ++ struct ata_port *ap = ata_shost_to_port(sdev->host); ++ struct ata_device *dev = ata_scsi_find_dev(ap, sdev); ++ unsigned long flags; ++ unsigned int action; ++ int rc = 0; + +- return ata_device_resume(ap, dev); ++ if (!dev) ++ goto out; ++ ++ spin_lock_irqsave(ap->lock, flags); ++ ++ /* wait for the previous resume to complete */ ++ while (dev->flags & ATA_DFLAG_SUSPENDED) { ++ spin_unlock_irqrestore(ap->lock, flags); ++ ata_port_wait_eh(ap); ++ spin_lock_irqsave(ap->lock, flags); ++ } ++ ++ /* if @sdev is already detached, nothing to do */ ++ if (sdev->sdev_state == SDEV_OFFLINE || ++ sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL) ++ goto out_unlock; ++ ++ /* request suspend */ ++ action = ATA_EH_SUSPEND; ++ if (mesg.event != PM_EVENT_SUSPEND) ++ action |= ATA_EH_PM_FREEZE; ++ ap->eh_info.dev_action[dev->devno] |= action; ++ ap->eh_info.flags |= ATA_EHI_QUIET; ++ ata_port_schedule_eh(ap); ++ ++ spin_unlock_irqrestore(ap->lock, flags); ++ ++ /* wait for EH to do the job */ ++ ata_port_wait_eh(ap); ++ ++ spin_lock_irqsave(ap->lock, flags); ++ ++ /* If @sdev is still attached but the associated ATA device ++ * isn't suspended, the operation failed. ++ */ ++ if (sdev->sdev_state != SDEV_OFFLINE && ++ sdev->sdev_state != SDEV_CANCEL && sdev->sdev_state != SDEV_DEL && ++ !(dev->flags & ATA_DFLAG_SUSPENDED)) ++ rc = -EIO; ++ ++ out_unlock: ++ spin_unlock_irqrestore(ap->lock, flags); ++ out: ++ if (rc == 0) ++ sdev->sdev_gendev.power.power_state = mesg; ++ return rc; + } + +-int ata_scsi_device_suspend(struct scsi_device *sdev, pm_message_t state) ++/** ++ * ata_scsi_device_resume - resume ATA device associated with sdev ++ * @sdev: the SCSI device to resume ++ * ++ * Request resume EH action on the ATA device associated with ++ * @sdev and return immediately. This enables parallel ++ * wakeup/spinup of devices. ++ * ++ * LOCKING: ++ * Kernel thread context (may sleep). ++ * ++ * RETURNS: ++ * 0. ++ */ ++int ata_scsi_device_resume(struct scsi_device *sdev) + { +- struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; +- struct ata_device *dev = &ap->device[sdev->id]; ++ struct ata_port *ap = ata_shost_to_port(sdev->host); ++ struct ata_device *dev = ata_scsi_find_dev(ap, sdev); ++ struct ata_eh_info *ehi = &ap->eh_info; ++ unsigned long flags; ++ unsigned int action; ++ ++ if (!dev) ++ goto out; ++ ++ spin_lock_irqsave(ap->lock, flags); ++ ++ /* if @sdev is already detached, nothing to do */ ++ if (sdev->sdev_state == SDEV_OFFLINE || ++ sdev->sdev_state == SDEV_CANCEL || sdev->sdev_state == SDEV_DEL) ++ goto out_unlock; ++ ++ /* request resume */ ++ action = ATA_EH_RESUME; ++ if (sdev->sdev_gendev.power.power_state.event == PM_EVENT_SUSPEND) ++ __ata_ehi_hotplugged(ehi); ++ else ++ action |= ATA_EH_PM_FREEZE | ATA_EH_SOFTRESET; ++ ehi->dev_action[dev->devno] |= action; ++ ++ /* We don't want autopsy and verbose EH messages. Disable ++ * those if we're the only device on this link. ++ */ ++ if (ata_port_max_devices(ap) == 1) ++ ehi->flags |= ATA_EHI_NO_AUTOPSY | ATA_EHI_QUIET; ++ ++ ata_port_schedule_eh(ap); + +- return ata_device_suspend(ap, dev, state); ++ out_unlock: ++ spin_unlock_irqrestore(ap->lock, flags); ++ out: ++ sdev->sdev_gendev.power.power_state = PMSG_ON; ++ return 0; + } + + /** +@@ -419,16 +530,17 @@ + * @sk: the sense key we'll fill out + * @asc: the additional sense code we'll fill out + * @ascq: the additional sense code qualifier we'll fill out ++ * @verbose: be verbose + * + * Converts an ATA error into a SCSI error. Fill out pointers to + * SK, ASC, and ASCQ bytes for later use in fixed or descriptor + * format sense blocks. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk, u8 *asc, +- u8 *ascq) ++ u8 *ascq, int verbose) + { + int i; + +@@ -493,8 +605,9 @@ + } + } + /* No immediate match */ +- printk(KERN_WARNING "ata%u: no sense translation for " +- "error 0x%02x\n", id, drv_err); ++ if (verbose) ++ printk(KERN_WARNING "ata%u: no sense translation for " ++ "error 0x%02x\n", id, drv_err); + } + + /* Fall back to interpreting status bits */ +@@ -507,8 +620,9 @@ + } + } + /* No error? Undecoded? */ +- printk(KERN_WARNING "ata%u: no sense translation for status: 0x%02x\n", +- id, drv_stat); ++ if (verbose) ++ printk(KERN_WARNING "ata%u: no sense translation for " ++ "status: 0x%02x\n", id, drv_stat); + + /* We need a sensible error return here, which is tricky, and one + that won't cause people to do things like return a disk wrongly */ +@@ -517,9 +631,10 @@ + *ascq = 0x00; + + translate_done: +- printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x to " +- "SCSI SK/ASC/ASCQ 0x%x/%02x/%02x\n", id, drv_stat, drv_err, +- *sk, *asc, *ascq); ++ if (verbose) ++ printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x " ++ "to SCSI SK/ASC/ASCQ 0x%x/%02x/%02x\n", ++ id, drv_stat, drv_err, *sk, *asc, *ascq); + return; + } + +@@ -534,32 +649,28 @@ + * block. Clear sense key, ASC & ASCQ if there is no error. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + void ata_gen_ata_desc_sense(struct ata_queued_cmd *qc) + { + struct scsi_cmnd *cmd = qc->scsicmd; +- struct ata_taskfile *tf = &qc->tf; ++ struct ata_taskfile *tf = &qc->result_tf; + unsigned char *sb = cmd->sense_buffer; + unsigned char *desc = sb + 8; ++ int verbose = qc->ap->ops->error_handler == NULL; + + memset(sb, 0, SCSI_SENSE_BUFFERSIZE); + + cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; + + /* +- * Read the controller registers. +- */ +- WARN_ON(qc->ap->ops->tf_read == NULL); +- qc->ap->ops->tf_read(qc->ap, tf); +- +- /* + * Use ata_to_sense_error() to map status register bits + * onto sense key, asc & ascq. + */ +- if (tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { ++ if (qc->err_mask || ++ tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { + ata_to_sense_error(qc->ap->id, tf->command, tf->feature, +- &sb[1], &sb[2], &sb[3]); ++ &sb[1], &sb[2], &sb[3], verbose); + sb[1] &= 0x0f; + } + +@@ -615,26 +726,22 @@ + void ata_gen_fixed_sense(struct ata_queued_cmd *qc) + { + struct scsi_cmnd *cmd = qc->scsicmd; +- struct ata_taskfile *tf = &qc->tf; ++ struct ata_taskfile *tf = &qc->result_tf; + unsigned char *sb = cmd->sense_buffer; ++ int verbose = qc->ap->ops->error_handler == NULL; + + memset(sb, 0, SCSI_SENSE_BUFFERSIZE); + + cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION; + + /* +- * Read the controller registers. +- */ +- WARN_ON(qc->ap->ops->tf_read == NULL); +- qc->ap->ops->tf_read(qc->ap, tf); +- +- /* + * Use ata_to_sense_error() to map status register bits + * onto sense key, asc & ascq. + */ +- if (tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { ++ if (qc->err_mask || ++ tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) { + ata_to_sense_error(qc->ap->id, tf->command, tf->feature, +- &sb[2], &sb[12], &sb[13]); ++ &sb[2], &sb[12], &sb[13], verbose); + sb[2] &= 0x0f; + } + +@@ -677,7 +784,7 @@ + */ + max_sectors = ATA_MAX_SECTORS; + if (dev->flags & ATA_DFLAG_LBA48) +- max_sectors = 2048; ++ max_sectors = ATA_MAX_SECTORS_LBA48; + if (dev->max_sectors) + max_sectors = dev->max_sectors; + +@@ -692,6 +799,51 @@ + request_queue_t *q = sdev->request_queue; + blk_queue_max_hw_segments(q, q->max_hw_segments - 1); + } ++ ++ if (dev->flags & ATA_DFLAG_NCQ) { ++ int depth; ++ ++ depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); ++ depth = min(ATA_MAX_QUEUE - 1, depth); ++ scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth); ++ } ++} ++ ++extern int scsi_protect_queue(request_queue_t *q, int unload); ++extern int scsi_unprotect_queue(request_queue_t *q); ++ ++static int ata_scsi_issue_protect_fn(request_queue_t *q) ++{ ++ struct scsi_device *sdev = q->queuedata; ++ struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; ++ struct ata_device *dev = &ap->link.device[sdev->id]; ++ int unload; ++ ++ if (libata_protect_method == 1) { ++ unload = 1; ++ printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload method requested, overriding drive capability check..\n"); ++ } ++ else if (libata_protect_method == 2) { ++ unload = 0; ++ printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): standby method requested, overriding drive capability check..\n"); ++ } ++ else if (ata_id_has_unload(dev->id)) { ++ unload = 1; ++ printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload support reported by drive..\n"); ++ } ++ else { ++ unload = 0; ++ printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload support NOT reported by drive!..\n"); ++ } ++ ++ ++ /* call scsi_protect_queue, requesting either unload or standby */ ++ return scsi_protect_queue(q, unload); ++} ++ ++static int ata_scsi_issue_unprotect_fn(request_queue_t *q) ++{ ++ return scsi_unprotect_queue(q); + } + + /** +@@ -708,152 +860,91 @@ + + int ata_scsi_slave_config(struct scsi_device *sdev) + { ++ struct ata_port *ap = ata_shost_to_port(sdev->host); ++ struct ata_device *dev = __ata_scsi_find_dev(ap, sdev); ++ + ata_scsi_sdev_config(sdev); + + blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); + +- if (sdev->id < ATA_MAX_DEVICES) { +- struct ata_port *ap; +- struct ata_device *dev; +- +- ap = (struct ata_port *) &sdev->host->hostdata[0]; +- dev = &ap->device[sdev->id]; +- ++ if (dev) + ata_scsi_dev_config(sdev, dev); +- } ++ ++ blk_queue_issue_protect_fn(sdev->request_queue, ata_scsi_issue_protect_fn); ++ blk_queue_issue_unprotect_fn(sdev->request_queue, ata_scsi_issue_unprotect_fn); + + return 0; /* scsi layer doesn't check return value, sigh */ + } + + /** +- * ata_scsi_timed_out - SCSI layer time out callback +- * @cmd: timed out SCSI command ++ * ata_scsi_slave_destroy - SCSI device is about to be destroyed ++ * @sdev: SCSI device to be destroyed + * +- * Handles SCSI layer timeout. We race with normal completion of +- * the qc for @cmd. If the qc is already gone, we lose and let +- * the scsi command finish (EH_HANDLED). Otherwise, the qc has +- * timed out and EH should be invoked. Prevent ata_qc_complete() +- * from finishing it by setting EH_SCHEDULED and return +- * EH_NOT_HANDLED. ++ * @sdev is about to be destroyed for hot/warm unplugging. If ++ * this unplugging was initiated by libata as indicated by NULL ++ * dev->sdev, this function doesn't have to do anything. ++ * Otherwise, SCSI layer initiated warm-unplug is in progress. ++ * Clear dev->sdev, schedule the device for ATA detach and invoke ++ * EH. + * + * LOCKING: +- * Called from timer context +- * +- * RETURNS: +- * EH_HANDLED or EH_NOT_HANDLED ++ * Defined by SCSI layer. We don't really care. + */ +-enum scsi_eh_timer_return ata_scsi_timed_out(struct scsi_cmnd *cmd) ++void ata_scsi_slave_destroy(struct scsi_device *sdev) + { +- struct Scsi_Host *host = cmd->device->host; +- struct ata_port *ap = (struct ata_port *) &host->hostdata[0]; ++ struct ata_port *ap = ata_shost_to_port(sdev->host); + unsigned long flags; +- struct ata_queued_cmd *qc; +- enum scsi_eh_timer_return ret = EH_HANDLED; ++ struct ata_device *dev; + +- DPRINTK("ENTER\n"); ++ if (!ap->ops->error_handler) ++ return; + +- spin_lock_irqsave(&ap->host_set->lock, flags); +- qc = ata_qc_from_tag(ap, ap->active_tag); +- if (qc) { +- WARN_ON(qc->scsicmd != cmd); +- qc->flags |= ATA_QCFLAG_EH_SCHEDULED; +- qc->err_mask |= AC_ERR_TIMEOUT; +- ret = EH_NOT_HANDLED; ++ spin_lock_irqsave(ap->lock, flags); ++ dev = __ata_scsi_find_dev(ap, sdev); ++ if (dev && dev->sdev) { ++ /* SCSI device already in CANCEL state, no need to offline it */ ++ dev->sdev = NULL; ++ dev->flags |= ATA_DFLAG_DETACH; ++ ata_port_schedule_eh(ap); + } +- spin_unlock_irqrestore(&ap->host_set->lock, flags); +- +- DPRINTK("EXIT, ret=%d\n", ret); +- return ret; ++ spin_unlock_irqrestore(ap->lock, flags); + } + + /** +- * ata_scsi_error - SCSI layer error handler callback +- * @host: SCSI host on which error occurred ++ * ata_scsi_change_queue_depth - SCSI callback for queue depth config ++ * @sdev: SCSI device to configure queue depth for ++ * @queue_depth: new queue depth + * +- * Handles SCSI-layer-thrown error events. ++ * This is libata standard hostt->change_queue_depth callback. ++ * SCSI will call into this callback when user tries to set queue ++ * depth via sysfs. + * + * LOCKING: +- * Inherited from SCSI layer (none, can sleep) ++ * SCSI layer (we don't care) ++ * ++ * RETURNS: ++ * Newly configured queue depth. + */ +- +-static void ata_scsi_error(struct Scsi_Host *host) +-{ +- struct ata_port *ap; +- unsigned long flags; +- +- DPRINTK("ENTER\n"); +- +- ap = (struct ata_port *) &host->hostdata[0]; +- +- spin_lock_irqsave(&ap->host_set->lock, flags); +- WARN_ON(ap->flags & ATA_FLAG_IN_EH); +- ap->flags |= ATA_FLAG_IN_EH; +- WARN_ON(ata_qc_from_tag(ap, ap->active_tag) == NULL); +- spin_unlock_irqrestore(&ap->host_set->lock, flags); +- +- ata_port_flush_task(ap); +- +- ap->ops->eng_timeout(ap); +- +- WARN_ON(host->host_failed || !list_empty(&host->eh_cmd_q)); +- +- scsi_eh_flush_done_q(&ap->eh_done_q); +- +- spin_lock_irqsave(&ap->host_set->lock, flags); +- ap->flags &= ~ATA_FLAG_IN_EH; +- spin_unlock_irqrestore(&ap->host_set->lock, flags); +- +- DPRINTK("EXIT\n"); +-} +- +-static void ata_eh_scsidone(struct scsi_cmnd *scmd) +-{ +- /* nada */ +-} +- +-static void __ata_eh_qc_complete(struct ata_queued_cmd *qc) ++int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth) + { +- struct ata_port *ap = qc->ap; +- struct scsi_cmnd *scmd = qc->scsicmd; +- unsigned long flags; +- +- spin_lock_irqsave(&ap->host_set->lock, flags); +- qc->scsidone = ata_eh_scsidone; +- __ata_qc_complete(qc); +- WARN_ON(ata_tag_valid(qc->tag)); +- spin_unlock_irqrestore(&ap->host_set->lock, flags); ++ struct ata_port *ap = ata_shost_to_port(sdev->host); ++ struct ata_device *dev; ++ int max_depth; + +- scsi_eh_finish_cmd(scmd, &ap->eh_done_q); +-} ++ if (queue_depth < 1) ++ return sdev->queue_depth; + +-/** +- * ata_eh_qc_complete - Complete an active ATA command from EH +- * @qc: Command to complete +- * +- * Indicate to the mid and upper layers that an ATA command has +- * completed. To be used from EH. +- */ +-void ata_eh_qc_complete(struct ata_queued_cmd *qc) +-{ +- struct scsi_cmnd *scmd = qc->scsicmd; +- scmd->retries = scmd->allowed; +- __ata_eh_qc_complete(qc); +-} ++ dev = ata_scsi_find_dev(ap, sdev); ++ if (!dev || !ata_dev_enabled(dev)) ++ return sdev->queue_depth; ++ ++ max_depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id)); ++ max_depth = min(ATA_MAX_QUEUE - 1, max_depth); ++ if (queue_depth > max_depth) ++ queue_depth = max_depth; + +-/** +- * ata_eh_qc_retry - Tell midlayer to retry an ATA command after EH +- * @qc: Command to retry +- * +- * Indicate to the mid and upper layers that an ATA command +- * should be retried. To be used from EH. +- * +- * SCSI midlayer limits the number of retries to scmd->allowed. +- * This function might need to adjust scmd->retries for commands +- * which get retried due to unrelated NCQ failures. +- */ +-void ata_eh_qc_retry(struct ata_queued_cmd *qc) +-{ +- __ata_eh_qc_complete(qc); ++ scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, queue_depth); ++ return queue_depth; + } + + /** +@@ -867,7 +958,7 @@ + * [See SAT revision 5 at www.t10.org] + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Zero on success, non-zero on error. +@@ -891,7 +982,7 @@ + tf->nsect = 1; /* 1 sector, lba=0 */ + + if (qc->dev->flags & ATA_DFLAG_LBA) { +- qc->tf.flags |= ATA_TFLAG_LBA; ++ tf->flags |= ATA_TFLAG_LBA; + + tf->lbah = 0x0; + tf->lbam = 0x0; +@@ -935,7 +1026,7 @@ + * FLUSH CACHE EXT. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Zero on success, non-zero on error. +@@ -1058,7 +1149,7 @@ + * Converts SCSI VERIFY command to an ATA READ VERIFY command. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Zero on success, non-zero on error. +@@ -1182,7 +1273,7 @@ + * %WRITE_16 are currently supported. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Zero on success, non-zero on error. +@@ -1195,6 +1286,7 @@ + u64 block; + u32 n_block; + ++ qc->flags |= ATA_QCFLAG_IO; + tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE; + + if (scsicmd[0] == WRITE_10 || scsicmd[0] == WRITE_6 || +@@ -1241,7 +1333,36 @@ + */ + goto nothing_to_do; + +- if (dev->flags & ATA_DFLAG_LBA) { ++ if ((dev->flags & (ATA_DFLAG_PIO | ATA_DFLAG_NCQ)) == ATA_DFLAG_NCQ) { ++ /* yay, NCQ */ ++ if (!lba_48_ok(block, n_block)) ++ goto out_of_range; ++ ++ tf->protocol = ATA_PROT_NCQ; ++ tf->flags |= ATA_TFLAG_LBA | ATA_TFLAG_LBA48; ++ ++ if (tf->flags & ATA_TFLAG_WRITE) ++ tf->command = ATA_CMD_FPDMA_WRITE; ++ else ++ tf->command = ATA_CMD_FPDMA_READ; ++ ++ qc->nsect = n_block; ++ ++ tf->nsect = qc->tag << 3; ++ tf->hob_feature = (n_block >> 8) & 0xff; ++ tf->feature = n_block & 0xff; ++ ++ tf->hob_lbah = (block >> 40) & 0xff; ++ tf->hob_lbam = (block >> 32) & 0xff; ++ tf->hob_lbal = (block >> 24) & 0xff; ++ tf->lbah = (block >> 16) & 0xff; ++ tf->lbam = (block >> 8) & 0xff; ++ tf->lbal = block & 0xff; ++ ++ tf->device = 1 << 6; ++ if (tf->flags & ATA_TFLAG_FUA) ++ tf->device |= 1 << 7; ++ } else if (dev->flags & ATA_DFLAG_LBA) { + tf->flags |= ATA_TFLAG_LBA; + + if (lba_28_ok(block, n_block)) { +@@ -1332,6 +1453,17 @@ + u8 *cdb = cmd->cmnd; + int need_sense = (qc->err_mask != 0); + ++ /* We snoop the SET_FEATURES - Write Cache ON/OFF command, and ++ * schedule EH_REVALIDATE operation to update the IDENTIFY DEVICE ++ * cache ++ */ ++ if (!need_sense && (qc->tf.command == ATA_CMD_SET_FEATURES) && ++ ((qc->tf.feature == SETFEATURES_WC_ON) || ++ (qc->tf.feature == SETFEATURES_WC_OFF))) { ++ qc->ap->eh_info.action |= ATA_EH_REVALIDATE; ++ ata_port_schedule_eh(qc->ap); ++ } ++ + /* For ATA pass thru (SAT) commands, generate a sense block if + * user mandated it or if there's an error. Note that if we + * generate because the user forced us to, a check condition +@@ -1356,10 +1488,8 @@ + } + } + +- if (need_sense) { +- /* The ata_gen_..._sense routines fill in tf */ +- ata_dump_status(qc->ap->id, &qc->tf); +- } ++ if (need_sense && !qc->ap->ops->error_handler) ++ ata_dump_status(qc->ap->id, &qc->result_tf); + + qc->scsidone(cmd); + +@@ -1367,8 +1497,40 @@ + } + + /** ++ * ata_scmd_need_defer - Check whether we need to defer scmd ++ * @dev: ATA device to which the command is addressed ++ * @is_io: Is the command IO (and thus possibly NCQ)? ++ * ++ * NCQ and non-NCQ commands cannot run together. As upper layer ++ * only knows the queue depth, we are responsible for maintaining ++ * exclusion. This function checks whether a new command can be ++ * issued to @dev. ++ * ++ * LOCKING: ++ * spin_lock_irqsave(host lock) ++ * ++ * RETURNS: ++ * 1 if deferring is needed, 0 otherwise. ++ */ ++static int ata_scmd_need_defer(struct ata_device *dev, int is_io) ++{ ++ struct ata_port *ap = dev->ap; ++ ++ if (!(dev->flags & ATA_DFLAG_NCQ)) ++ return 0; ++ ++ if (is_io) { ++ if (!ata_tag_valid(ap->active_tag)) ++ return 0; ++ } else { ++ if (!ata_tag_valid(ap->active_tag) && !ap->sactive) ++ return 0; ++ } ++ return 1; ++} ++ ++/** + * ata_scsi_translate - Translate then issue SCSI command to ATA device +- * @ap: ATA port to which the command is addressed + * @dev: ATA device to which the command is addressed + * @cmd: SCSI command to execute + * @done: SCSI command completion function +@@ -1388,20 +1550,26 @@ + * termination. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) ++ * ++ * RETURNS: ++ * 0 on success, SCSI_ML_QUEUE_DEVICE_BUSY if the command ++ * needs to be deferred. + */ +- +-static void ata_scsi_translate(struct ata_port *ap, struct ata_device *dev, +- struct scsi_cmnd *cmd, ++static int ata_scsi_translate(struct ata_device *dev, struct scsi_cmnd *cmd, + void (*done)(struct scsi_cmnd *), + ata_xlat_func_t xlat_func) + { + struct ata_queued_cmd *qc; + u8 *scsicmd = cmd->cmnd; ++ int is_io = xlat_func == ata_scsi_rw_xlat; + + VPRINTK("ENTER\n"); + +- qc = ata_scsi_qc_new(ap, dev, cmd, done); ++ if (unlikely(ata_scmd_need_defer(dev, is_io))) ++ goto defer; ++ ++ qc = ata_scsi_qc_new(dev, cmd, done); + if (!qc) + goto err_mem; + +@@ -1409,8 +1577,8 @@ + if (cmd->sc_data_direction == DMA_FROM_DEVICE || + cmd->sc_data_direction == DMA_TO_DEVICE) { + if (unlikely(cmd->request_bufflen < 1)) { +- printk(KERN_WARNING "ata%u(%u): WARNING: zero len r/w req\n", +- ap->id, dev->devno); ++ ata_dev_printk(dev, KERN_WARNING, ++ "WARNING: zero len r/w req\n"); + goto err_did; + } + +@@ -1432,13 +1600,13 @@ + ata_qc_issue(qc); + + VPRINTK("EXIT\n"); +- return; ++ return 0; + + early_finish: + ata_qc_free(qc); + done(cmd); + DPRINTK("EXIT - early finish (good or error)\n"); +- return; ++ return 0; + + err_did: + ata_qc_free(qc); +@@ -1446,7 +1614,11 @@ + cmd->result = (DID_ERROR << 16); + done(cmd); + DPRINTK("EXIT - internal\n"); +- return; ++ return 0; ++ ++defer: ++ DPRINTK("EXIT - defer\n"); ++ return SCSI_MLQUEUE_DEVICE_BUSY; + } + + /** +@@ -1457,7 +1629,7 @@ + * Maps buffer contained within SCSI command @cmd. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Length of response buffer. +@@ -1491,7 +1663,7 @@ + * Unmaps response buffer contained within @cmd. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + static inline void ata_scsi_rbuf_put(struct scsi_cmnd *cmd, u8 *buf) +@@ -1517,7 +1689,7 @@ + * and sense buffer are assumed to be set). + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + void ata_scsi_rbuf_fill(struct ata_scsi_args *args, +@@ -1548,7 +1720,7 @@ + * with non-VPD INQUIRY command output. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_inq_std(struct ata_scsi_args *args, u8 *rbuf, +@@ -1604,7 +1776,7 @@ + * Returns list of inquiry VPD pages available. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_inq_00(struct ata_scsi_args *args, u8 *rbuf, +@@ -1632,7 +1804,7 @@ + * Returns ATA device serial number. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_inq_80(struct ata_scsi_args *args, u8 *rbuf, +@@ -1665,7 +1837,7 @@ + * name ("ATA "), model and serial numbers. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_inq_83(struct ata_scsi_args *args, u8 *rbuf, +@@ -1717,7 +1889,7 @@ + * that the caller should successfully complete this SCSI command. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_noop(struct ata_scsi_args *args, u8 *rbuf, +@@ -1858,7 +2030,7 @@ + * descriptor for other device types. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_mode_sense(struct ata_scsi_args *args, u8 *rbuf, +@@ -1944,7 +2116,7 @@ + return 0; + + dpofua = 0; +- if (ata_dev_supports_fua(args->id) && dev->flags & ATA_DFLAG_LBA48 && ++ if (ata_dev_supports_fua(args->id) && (dev->flags & ATA_DFLAG_LBA48) && + (!(dev->flags & ATA_DFLAG_PIO) || dev->multi_count)) + dpofua = 1 << 4; + +@@ -1997,7 +2169,7 @@ + * Simulate READ CAPACITY commands. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_read_cap(struct ata_scsi_args *args, u8 *rbuf, +@@ -2072,7 +2244,7 @@ + * Simulate REPORT LUNS command. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + unsigned int ata_scsiop_report_luns(struct ata_scsi_args *args, u8 *rbuf, +@@ -2124,7 +2296,7 @@ + * and the specified additional sense codes. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + + void ata_scsi_badcmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), u8 asc, u8 ascq) +@@ -2137,13 +2309,14 @@ + + static void atapi_sense_complete(struct ata_queued_cmd *qc) + { +- if (qc->err_mask && ((qc->err_mask & AC_ERR_DEV) == 0)) ++ if (qc->err_mask && ((qc->err_mask & AC_ERR_DEV) == 0)) { + /* FIXME: not quite right; we don't want the + * translation of taskfile registers into + * a sense descriptors, since that's only + * correct for ATA, not ATAPI + */ + ata_gen_ata_desc_sense(qc); ++ } + + qc->scsidone(qc->scsicmd); + ata_qc_free(qc); +@@ -2207,21 +2380,51 @@ + + VPRINTK("ENTER, err_mask 0x%X\n", err_mask); + ++ /* handle completion from new EH */ ++ if (unlikely(qc->ap->ops->error_handler && ++ (err_mask || qc->flags & ATA_QCFLAG_SENSE_VALID))) { ++ ++ if (!(qc->flags & ATA_QCFLAG_SENSE_VALID)) { ++ /* FIXME: not quite right; we don't want the ++ * translation of taskfile registers into a ++ * sense descriptors, since that's only ++ * correct for ATA, not ATAPI ++ */ ++ ata_gen_ata_desc_sense(qc); ++ } ++ ++ /* SCSI EH automatically locks door if sdev->locked is ++ * set. Sometimes door lock request continues to ++ * fail, for example, when no media is present. This ++ * creates a loop - SCSI EH issues door lock which ++ * fails and gets invoked again to acquire sense data ++ * for the failed command. ++ * ++ * If door lock fails, always clear sdev->locked to ++ * avoid this infinite loop. ++ */ ++ if (qc->cdb[0] == ALLOW_MEDIUM_REMOVAL) ++ qc->dev->sdev->locked = 0; ++ ++ qc->scsicmd->result = SAM_STAT_CHECK_CONDITION; ++ qc->scsidone(cmd); ++ ata_qc_free(qc); ++ return; ++ } ++ ++ /* successful completion or old EH failure path */ + if (unlikely(err_mask & AC_ERR_DEV)) { + cmd->result = SAM_STAT_CHECK_CONDITION; + atapi_request_sense(qc); + return; +- } +- +- else if (unlikely(err_mask)) ++ } else if (unlikely(err_mask)) { + /* FIXME: not quite right; we don't want the + * translation of taskfile registers into + * a sense descriptors, since that's only + * correct for ATA, not ATAPI + */ + ata_gen_ata_desc_sense(qc); +- +- else { ++ } else { + u8 *scsicmd = cmd->cmnd; + + if ((scsicmd[0] == INQUIRY) && ((scsicmd[1] & 0x03) == 0)) { +@@ -2258,7 +2461,7 @@ + * @scsicmd: SCSI CDB associated with this PACKET command + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Zero on success, non-zero on failure. +@@ -2303,18 +2506,63 @@ + qc->tf.protocol = ATA_PROT_ATAPI_DMA; + qc->tf.feature |= ATAPI_PKT_DMA; + +-#ifdef ATAPI_ENABLE_DMADIR +- /* some SATA bridges need us to indicate data xfer direction */ +- if (cmd->sc_data_direction != DMA_TO_DEVICE) ++ if (atapi_dmadir && (cmd->sc_data_direction != DMA_TO_DEVICE)) ++ /* some SATA bridges need us to indicate data xfer direction */ + qc->tf.feature |= ATAPI_DMADIR; +-#endif + } + +- qc->nbytes = cmd->bufflen; ++ qc->nbytes = cmd->request_bufflen; + + return 0; + } + ++static struct ata_device * ata_find_dev(struct ata_port *ap, int id) ++{ ++ if (likely(id < ATA_MAX_DEVICES)) ++ return &ap->device[id]; ++ return NULL; ++} ++ ++static struct ata_device * __ata_scsi_find_dev(struct ata_port *ap, ++ const struct scsi_device *scsidev) ++{ ++ /* skip commands not addressed to targets we simulate */ ++ if (unlikely(scsidev->channel || scsidev->lun)) ++ return NULL; ++ ++ return ata_find_dev(ap, scsidev->id); ++} ++ ++/** ++ * ata_scsi_dev_enabled - determine if device is enabled ++ * @dev: ATA device ++ * ++ * Determine if commands should be sent to the specified device. ++ * ++ * LOCKING: ++ * spin_lock_irqsave(host lock) ++ * ++ * RETURNS: ++ * 0 if commands are not allowed / 1 if commands are allowed ++ */ ++ ++static int ata_scsi_dev_enabled(struct ata_device *dev) ++{ ++ if (unlikely(!ata_dev_enabled(dev))) ++ return 0; ++ ++ if (!atapi_enabled || (dev->ap->flags & ATA_FLAG_NO_ATAPI)) { ++ if (unlikely(dev->class == ATA_DEV_ATAPI)) { ++ ata_dev_printk(dev, KERN_WARNING, ++ "WARNING: ATAPI is %s, device ignored.\n", ++ atapi_enabled ? "not supported with this driver" : "disabled"); ++ return 0; ++ } ++ } ++ ++ return 1; ++} ++ + /** + * ata_scsi_find_dev - lookup ata_device from scsi_cmnd + * @ap: ATA port to which the device is attached +@@ -2326,38 +2574,19 @@ + * SCSI command to be sent. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + * + * RETURNS: + * Associated ATA device, or %NULL if not found. + */ +- + static struct ata_device * + ata_scsi_find_dev(struct ata_port *ap, const struct scsi_device *scsidev) + { +- struct ata_device *dev; +- +- /* skip commands not addressed to targets we simulate */ +- if (likely(scsidev->id < ATA_MAX_DEVICES)) +- dev = &ap->device[scsidev->id]; +- else +- return NULL; ++ struct ata_device *dev = __ata_scsi_find_dev(ap, scsidev); + +- if (unlikely((scsidev->channel != 0) || +- (scsidev->lun != 0))) ++ if (unlikely(!dev || !ata_scsi_dev_enabled(dev))) + return NULL; + +- if (unlikely(!ata_dev_present(dev))) +- return NULL; +- +- if (!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) { +- if (unlikely(dev->class == ATA_DEV_ATAPI)) { +- printk(KERN_WARNING "ata%u(%u): WARNING: ATAPI is %s, device ignored.\n", +- ap->id, dev->devno, atapi_enabled ? "not supported with this driver" : "disabled"); +- return NULL; +- } +- } +- + return dev; + } + +@@ -2414,10 +2643,15 @@ + { + struct ata_taskfile *tf = &(qc->tf); + struct scsi_cmnd *cmd = qc->scsicmd; ++ struct ata_device *dev = qc->dev; + + if ((tf->protocol = ata_scsi_map_proto(scsicmd[1])) == ATA_PROT_UNKNOWN) + goto invalid_fld; + ++ /* We may not issue DMA commands if no DMA mode is set */ ++ if (tf->protocol == ATA_PROT_DMA && dev->dma_mode == 0) ++ goto invalid_fld; ++ + if (scsicmd[1] & 0xe0) + /* PIO multi not supported yet */ + goto invalid_fld; +@@ -2500,7 +2734,10 @@ + * TODO: find out if we need to do more here to + * cover scatter/gather case. + */ +- qc->nsect = cmd->bufflen / ATA_SECT_SIZE; ++ qc->nsect = cmd->request_bufflen / ATA_SECT_SIZE; ++ ++ /* request result TF */ ++ qc->flags |= ATA_QCFLAG_RESULT_TF; + + return 0; + +@@ -2578,19 +2815,24 @@ + #endif + } + +-static inline void __ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), +- struct ata_port *ap, struct ata_device *dev) ++static inline int __ata_scsi_queuecmd(struct scsi_cmnd *cmd, ++ void (*done)(struct scsi_cmnd *), ++ struct ata_device *dev) + { ++ int rc = 0; ++ + if (dev->class == ATA_DEV_ATA) { + ata_xlat_func_t xlat_func = ata_get_xlat_func(dev, + cmd->cmnd[0]); + + if (xlat_func) +- ata_scsi_translate(ap, dev, cmd, done, xlat_func); ++ rc = ata_scsi_translate(dev, cmd, done, xlat_func); + else +- ata_scsi_simulate(ap, dev, cmd, done); ++ ata_scsi_simulate(dev, cmd, done); + } else +- ata_scsi_translate(ap, dev, cmd, done, atapi_xlat); ++ rc = ata_scsi_translate(dev, cmd, done, atapi_xlat); ++ ++ return rc; + } + + /** +@@ -2606,42 +2848,42 @@ + * ATA and ATAPI devices appearing as SCSI devices. + * + * LOCKING: +- * Releases scsi-layer-held lock, and obtains host_set lock. ++ * Releases scsi-layer-held lock, and obtains host lock. + * + * RETURNS: +- * Zero. ++ * Return value from __ata_scsi_queuecmd() if @cmd can be queued, ++ * 0 otherwise. + */ +- + int ata_scsi_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *)) + { + struct ata_port *ap; + struct ata_device *dev; + struct scsi_device *scsidev = cmd->device; + struct Scsi_Host *shost = scsidev->host; ++ int rc = 0; + +- ap = (struct ata_port *) &shost->hostdata[0]; ++ ap = ata_shost_to_port(shost); + + spin_unlock(shost->host_lock); +- spin_lock(&ap->host_set->lock); ++ spin_lock(ap->lock); + + ata_scsi_dump_cdb(ap, cmd); + + dev = ata_scsi_find_dev(ap, scsidev); + if (likely(dev)) +- __ata_scsi_queuecmd(cmd, done, ap, dev); ++ rc = __ata_scsi_queuecmd(cmd, done, dev); + else { + cmd->result = (DID_BAD_TARGET << 16); + done(cmd); + } + +- spin_unlock(&ap->host_set->lock); ++ spin_unlock(ap->lock); + spin_lock(shost->host_lock); +- return 0; ++ return rc; + } + + /** + * ata_scsi_simulate - simulate SCSI command on ATA device +- * @ap: port the device is connected to + * @dev: the target device + * @cmd: SCSI command being sent to device. + * @done: SCSI command completion function. +@@ -2650,17 +2892,15 @@ + * that can be handled internally. + * + * LOCKING: +- * spin_lock_irqsave(host_set lock) ++ * spin_lock_irqsave(host lock) + */ + +-void ata_scsi_simulate(struct ata_port *ap, struct ata_device *dev, +- struct scsi_cmnd *cmd, ++void ata_scsi_simulate(struct ata_device *dev, struct scsi_cmnd *cmd, + void (*done)(struct scsi_cmnd *)) + { + struct ata_scsi_args args; + const u8 *scsicmd = cmd->cmnd; + +- args.ap = ap; + args.dev = dev; + args.id = dev->id; + args.cmd = cmd; +@@ -2732,17 +2972,391 @@ + + void ata_scsi_scan_host(struct ata_port *ap) + { +- struct ata_device *dev; + unsigned int i; + +- if (ap->flags & ATA_FLAG_PORT_DISABLED) ++ if (ap->flags & ATA_FLAG_DISABLED) + return; + + for (i = 0; i < ATA_MAX_DEVICES; i++) { ++ struct ata_device *dev = &ap->device[i]; ++ struct scsi_device *sdev; ++ ++ if (!ata_dev_enabled(dev) || dev->sdev) ++ continue; ++ ++ sdev = __scsi_add_device(ap->scsi_host, 0, i, 0, NULL); ++ if (!IS_ERR(sdev)) { ++ dev->sdev = sdev; ++ scsi_device_put(sdev); ++ } ++ } ++} ++ ++/** ++ * ata_scsi_offline_dev - offline attached SCSI device ++ * @dev: ATA device to offline attached SCSI device for ++ * ++ * This function is called from ata_eh_hotplug() and responsible ++ * for taking the SCSI device attached to @dev offline. This ++ * function is called with host lock which protects dev->sdev ++ * against clearing. ++ * ++ * LOCKING: ++ * spin_lock_irqsave(host lock) ++ * ++ * RETURNS: ++ * 1 if attached SCSI device exists, 0 otherwise. ++ */ ++int ata_scsi_offline_dev(struct ata_device *dev) ++{ ++ if (dev->sdev) { ++ scsi_device_set_state(dev->sdev, SDEV_OFFLINE); ++ return 1; ++ } ++ return 0; ++} ++ ++/** ++ * ata_scsi_remove_dev - remove attached SCSI device ++ * @dev: ATA device to remove attached SCSI device for ++ * ++ * This function is called from ata_eh_scsi_hotplug() and ++ * responsible for removing the SCSI device attached to @dev. ++ * ++ * LOCKING: ++ * Kernel thread context (may sleep). ++ */ ++static void ata_scsi_remove_dev(struct ata_device *dev) ++{ ++ struct ata_port *ap = dev->ap; ++ struct scsi_device *sdev; ++ unsigned long flags; ++ ++ /* Alas, we need to grab scan_mutex to ensure SCSI device ++ * state doesn't change underneath us and thus ++ * scsi_device_get() always succeeds. The mutex locking can ++ * be removed if there is __scsi_device_get() interface which ++ * increments reference counts regardless of device state. ++ */ ++ mutex_lock(&ap->scsi_host->scan_mutex); ++ spin_lock_irqsave(ap->lock, flags); ++ ++ /* clearing dev->sdev is protected by host lock */ ++ sdev = dev->sdev; ++ dev->sdev = NULL; ++ ++ if (sdev) { ++ /* If user initiated unplug races with us, sdev can go ++ * away underneath us after the host lock and ++ * scan_mutex are released. Hold onto it. ++ */ ++ if (scsi_device_get(sdev) == 0) { ++ /* The following ensures the attached sdev is ++ * offline on return from ata_scsi_offline_dev() ++ * regardless it wins or loses the race ++ * against this function. ++ */ ++ scsi_device_set_state(sdev, SDEV_OFFLINE); ++ } else { ++ WARN_ON(1); ++ sdev = NULL; ++ } ++ } ++ ++ spin_unlock_irqrestore(ap->lock, flags); ++ mutex_unlock(&ap->scsi_host->scan_mutex); ++ ++ if (sdev) { ++ ata_dev_printk(dev, KERN_INFO, "detaching (SCSI %s)\n", ++ sdev->sdev_gendev.bus_id); ++ ++ scsi_remove_device(sdev); ++ scsi_device_put(sdev); ++ } ++} ++ ++/** ++ * ata_scsi_hotplug - SCSI part of hotplug ++ * @data: Pointer to ATA port to perform SCSI hotplug on ++ * ++ * Perform SCSI part of hotplug. It's executed from a separate ++ * workqueue after EH completes. This is necessary because SCSI ++ * hot plugging requires working EH and hot unplugging is ++ * synchronized with hot plugging with a mutex. ++ * ++ * LOCKING: ++ * Kernel thread context (may sleep). ++ */ ++void ata_scsi_hotplug(void *data) ++{ ++ struct ata_port *ap = data; ++ int i; ++ ++ if (ap->pflags & ATA_PFLAG_UNLOADING) { ++ DPRINTK("ENTER/EXIT - unloading\n"); ++ return; ++ } ++ ++ DPRINTK("ENTER\n"); ++ ++ /* unplug detached devices */ ++ for (i = 0; i < ATA_MAX_DEVICES; i++) { ++ struct ata_device *dev = &ap->device[i]; ++ unsigned long flags; ++ ++ if (!(dev->flags & ATA_DFLAG_DETACHED)) ++ continue; ++ ++ spin_lock_irqsave(ap->lock, flags); ++ dev->flags &= ~ATA_DFLAG_DETACHED; ++ spin_unlock_irqrestore(ap->lock, flags); ++ ++ ata_scsi_remove_dev(dev); ++ } ++ ++ /* scan for new ones */ ++ ata_scsi_scan_host(ap); ++ ++ /* If we scanned while EH was in progress, scan would have ++ * failed silently. Requeue if there are enabled but ++ * unattached devices. ++ */ ++ for (i = 0; i < ATA_MAX_DEVICES; i++) { ++ struct ata_device *dev = &ap->device[i]; ++ if (ata_dev_enabled(dev) && !dev->sdev) { ++ queue_delayed_work(ata_aux_wq, &ap->hotplug_task, HZ); ++ break; ++ } ++ } ++ ++ DPRINTK("EXIT\n"); ++} ++ ++/** ++ * ata_scsi_user_scan - indication for user-initiated bus scan ++ * @shost: SCSI host to scan ++ * @channel: Channel to scan ++ * @id: ID to scan ++ * @lun: LUN to scan ++ * ++ * This function is called when user explicitly requests bus ++ * scan. Set probe pending flag and invoke EH. ++ * ++ * LOCKING: ++ * SCSI layer (we don't care) ++ * ++ * RETURNS: ++ * Zero. ++ */ ++static int ata_scsi_user_scan(struct Scsi_Host *shost, unsigned int channel, ++ unsigned int id, unsigned int lun) ++{ ++ struct ata_port *ap = ata_shost_to_port(shost); ++ unsigned long flags; ++ int rc = 0; ++ ++ if (!ap->ops->error_handler) ++ return -EOPNOTSUPP; ++ ++ if ((channel != SCAN_WILD_CARD && channel != 0) || ++ (lun != SCAN_WILD_CARD && lun != 0)) ++ return -EINVAL; ++ ++ spin_lock_irqsave(ap->lock, flags); ++ ++ if (id == SCAN_WILD_CARD) { ++ ap->eh_info.probe_mask |= (1 << ATA_MAX_DEVICES) - 1; ++ ap->eh_info.action |= ATA_EH_SOFTRESET; ++ } else { ++ struct ata_device *dev = ata_find_dev(ap, id); ++ ++ if (dev) { ++ ap->eh_info.probe_mask |= 1 << dev->devno; ++ ap->eh_info.action |= ATA_EH_SOFTRESET; ++ ap->eh_info.flags |= ATA_EHI_RESUME_LINK; ++ } else ++ rc = -EINVAL; ++ } ++ ++ if (rc == 0) ++ ata_port_schedule_eh(ap); ++ ++ spin_unlock_irqrestore(ap->lock, flags); ++ ++ return rc; ++} ++ ++/** ++ * ata_scsi_dev_rescan - initiate scsi_rescan_device() ++ * @data: Pointer to ATA port to perform scsi_rescan_device() ++ * ++ * After ATA pass thru (SAT) commands are executed successfully, ++ * libata need to propagate the changes to SCSI layer. This ++ * function must be executed from ata_aux_wq such that sdev ++ * attach/detach don't race with rescan. ++ * ++ * LOCKING: ++ * Kernel thread context (may sleep). ++ */ ++void ata_scsi_dev_rescan(void *data) ++{ ++ struct ata_port *ap = data; ++ struct ata_device *dev; ++ unsigned int i; ++ ++ for (i = 0; i < ATA_MAX_DEVICES; i++) { + dev = &ap->device[i]; + +- if (ata_dev_present(dev)) +- scsi_scan_target(&ap->host->shost_gendev, 0, i, 0, 0); ++ if (ata_dev_enabled(dev) && dev->sdev) ++ scsi_rescan_device(&(dev->sdev->sdev_gendev)); ++ } ++} ++ ++/** ++ * ata_sas_port_alloc - Allocate port for a SAS attached SATA device ++ * @pdev: PCI device that the scsi device is attached to ++ * @port_info: Information from low-level host driver ++ * @shost: SCSI host that the scsi device is attached to ++ * ++ * LOCKING: ++ * PCI/etc. bus probe sem. ++ * ++ * RETURNS: ++ * ata_port pointer on success / NULL on failure. ++ */ ++ ++struct ata_port *ata_sas_port_alloc(struct ata_host *host, ++ struct ata_port_info *port_info, ++ struct Scsi_Host *shost) ++{ ++ struct ata_port *ap = kzalloc(sizeof(*ap), GFP_KERNEL); ++ struct ata_probe_ent *ent; ++ ++ if (!ap) ++ return NULL; ++ ++ ent = ata_probe_ent_alloc(host->dev, port_info); ++ if (!ent) { ++ kfree(ap); ++ return NULL; + } ++ ++ ata_port_init(ap, host, ent, 0); ++ ap->lock = shost->host_lock; ++ kfree(ent); ++ return ap; ++} ++EXPORT_SYMBOL_GPL(ata_sas_port_alloc); ++ ++/** ++ * ata_sas_port_start - Set port up for dma. ++ * @ap: Port to initialize ++ * ++ * Called just after data structures for each port are ++ * initialized. Allocates DMA pad. ++ * ++ * May be used as the port_start() entry in ata_port_operations. ++ * ++ * LOCKING: ++ * Inherited from caller. ++ */ ++int ata_sas_port_start(struct ata_port *ap) ++{ ++ return ata_pad_alloc(ap, ap->dev); ++} ++EXPORT_SYMBOL_GPL(ata_sas_port_start); ++ ++/** ++ * ata_port_stop - Undo ata_sas_port_start() ++ * @ap: Port to shut down ++ * ++ * Frees the DMA pad. ++ * ++ * May be used as the port_stop() entry in ata_port_operations. ++ * ++ * LOCKING: ++ * Inherited from caller. ++ */ ++ ++void ata_sas_port_stop(struct ata_port *ap) ++{ ++ ata_pad_free(ap, ap->dev); ++} ++EXPORT_SYMBOL_GPL(ata_sas_port_stop); ++ ++/** ++ * ata_sas_port_init - Initialize a SATA device ++ * @ap: SATA port to initialize ++ * ++ * LOCKING: ++ * PCI/etc. bus probe sem. ++ * ++ * RETURNS: ++ * Zero on success, non-zero on error. ++ */ ++ ++int ata_sas_port_init(struct ata_port *ap) ++{ ++ int rc = ap->ops->port_start(ap); ++ ++ if (!rc) ++ rc = ata_bus_probe(ap); ++ ++ return rc; ++} ++EXPORT_SYMBOL_GPL(ata_sas_port_init); ++ ++/** ++ * ata_sas_port_destroy - Destroy a SATA port allocated by ata_sas_port_alloc ++ * @ap: SATA port to destroy ++ * ++ */ ++ ++void ata_sas_port_destroy(struct ata_port *ap) ++{ ++ ap->ops->port_stop(ap); ++ kfree(ap); ++} ++EXPORT_SYMBOL_GPL(ata_sas_port_destroy); ++ ++/** ++ * ata_sas_slave_configure - Default slave_config routine for libata devices ++ * @sdev: SCSI device to configure ++ * @ap: ATA port to which SCSI device is attached ++ * ++ * RETURNS: ++ * Zero. ++ */ ++ ++int ata_sas_slave_configure(struct scsi_device *sdev, struct ata_port *ap) ++{ ++ ata_scsi_sdev_config(sdev); ++ ata_scsi_dev_config(sdev, ap->device); ++ return 0; + } ++EXPORT_SYMBOL_GPL(ata_sas_slave_configure); ++ ++/** ++ * ata_sas_queuecmd - Issue SCSI cdb to libata-managed device ++ * @cmd: SCSI command to be sent ++ * @done: Completion function, called when command is complete ++ * @ap: ATA port to which the command is being sent ++ * ++ * RETURNS: ++ * Zero. ++ */ ++ ++int ata_sas_queuecmd(struct scsi_cmnd *cmd, void (*done)(struct scsi_cmnd *), ++ struct ata_port *ap) ++{ ++ ata_scsi_dump_cdb(ap, cmd); + ++ if (likely(ata_scsi_dev_enabled(ap->device))) ++ __ata_scsi_queuecmd(cmd, done, ap->device); ++ else { ++ cmd->result = (DID_BAD_TARGET << 16); ++ done(cmd); ++ } ++ return 0; ++} ++EXPORT_SYMBOL_GPL(ata_sas_queuecmd); diff -urN newtree/drivers/ata/libata-core.c newtree.2/drivers/ata/libata-core.c --- newtree/drivers/ata/libata-core.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/drivers/ata/libata-core.c 2006-09-17 09:28:13.000000000 -0400 @@ -74,6 +74,10 @@ struct workqueue_struct *ata_aux_wq; +int libata_protect_method = 0; +module_param_named(protect_method, libata_protect_method, int, 0444); +MODULE_PARM_DESC(protect_method, "hdaps disk protection method (0=autodetect, 1=unload, 2=standby)"); + int atapi_enabled = 1; module_param(atapi_enabled, int, 0444); MODULE_PARM_DESC(atapi_enabled, "Enable discovery of ATAPI devices (0=off, 1=on)"); diff -urN newtree/drivers/ata/libata-scsi.c newtree.2/drivers/ata/libata-scsi.c --- newtree/drivers/ata/libata-scsi.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/drivers/ata/libata-scsi.c 2006-09-17 09:59:26.000000000 -0400 @@ -809,6 +809,43 @@ } } +extern int scsi_protect_queue(request_queue_t *q, int unload); +extern int scsi_unprotect_queue(request_queue_t *q); + +static int ata_scsi_issue_protect_fn(request_queue_t *q) +{ + struct scsi_device *sdev = q->queuedata; + struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; + struct ata_device *dev = &ap->device[sdev->id]; + int unload; + + if (libata_protect_method == 1) { + unload = 1; + printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload method requested, overriding drive capability check..\n"); + } + else if (libata_protect_method == 2) { + unload = 0; + printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): standby method requested, overriding drive capability check..\n"); + } + else if (ata_id_has_unload(dev->id)) { + unload = 1; + printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload support reported by drive..\n"); + } + else { + unload = 0; + printk(KERN_DEBUG "ata_scsi_issue_protect_fn(): unload support NOT reported by drive!..\n"); + } + + + /* call scsi_protect_queue, requesting either unload or standby */ + return scsi_protect_queue(q, unload); +} + +static int ata_scsi_issue_unprotect_fn(request_queue_t *q) +{ + return scsi_unprotect_queue(q); +} + /** * ata_scsi_slave_config - Set SCSI device attributes * @sdev: SCSI device to examine @@ -833,6 +870,9 @@ if (dev) ata_scsi_dev_config(sdev, dev); + blk_queue_issue_protect_fn(sdev->request_queue, ata_scsi_issue_protect_fn); + blk_queue_issue_unprotect_fn(sdev->request_queue, ata_scsi_issue_unprotect_fn); + return 0; /* scsi layer doesn't check return value, sigh */ } diff -urN newtree/drivers/ata/libata.h newtree.2/drivers/ata/libata.h --- newtree/drivers/ata/libata.h 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/drivers/ata/libata.h 2006-09-17 09:28:31.000000000 -0400 @@ -40,6 +40,7 @@ /* libata-core.c */ extern struct workqueue_struct *ata_aux_wq; +extern int libata_protect_method; extern int atapi_enabled; extern int atapi_dmadir; extern int libata_fua; diff -urN newtree/drivers/ide/ide-disk.c newtree.2/drivers/ide/ide-disk.c --- newtree/drivers/ide/ide-disk.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/drivers/ide/ide-disk.c 2006-09-17 10:28:25.000000000 -0400 @@ -72,6 +72,10 @@ #include #include +int idedisk_protect_method = 0; +module_param_named(protect_method, idedisk_protect_method, int, 0444); +MODULE_PARM_DESC(protect_method, "hdaps disk protection method (0=autodetect, 1=unload, 2=standby)"); + struct ide_disk_obj { ide_drive_t *drive; ide_driver_t *driver; @@ -731,6 +735,154 @@ } /* + * todo: + * - we freeze the queue regardless of success and rely on the + * ide_protect_queue function to thaw immediately if the command + * failed (to be consistent with the libata handler)... should + * we also inspect here? + */ +void ide_end_protect_rq(struct request *rq, int error) +{ + struct completion *waiting = rq->end_io_data; + + /* spin lock already accquired */ + if (!blk_queue_stopped(rq->q)) + blk_stop_queue(rq->q); + + complete(waiting); +} + +int ide_unprotect_queue(request_queue_t *q) +{ + struct request rq; + unsigned long flags; + int pending = 0, rc = 0; + ide_drive_t *drive = q->queuedata; + u8 args[7], *argbuf = args; + + if (!blk_queue_stopped(q)) + return -EIO; + + /* Are there any pending jobs on the queue? */ + pending = ((q->rq.count[READ] > 0) || (q->rq.count[WRITE] > 0)) ? 1 : 0; + + spin_lock_irqsave(q->queue_lock, flags); + blk_start_queue(q); + spin_unlock_irqrestore(q->queue_lock, flags); + + /* The unload feature of the IDLE_IMMEDIATE command + temporarily disables HD power management from spinning down + the disk. Any other command will reenable HD pm, so, if + there are no pending jobs on the queue, another + CHECK_POWER_MODE1 command without the unload feature should do + just fine. */ + if (!pending) { + printk(KERN_DEBUG "ide_unprotect_queue(): No pending I/O, re-enabling power management..\n"); + memset(args, 0, sizeof(args)); + argbuf[0] = 0xe5; /* CHECK_POWER_MODE1 */ + ide_init_drive_cmd(&rq); + rq.cmd_type = REQ_TYPE_ATA_TASK; + rq.buffer = argbuf; + rc = ide_do_drive_cmd(drive, &rq, ide_head_wait); + } + + return rc; +} + +int ide_protect_queue(request_queue_t *q, int unload) +{ + ide_drive_t *drive = q->queuedata; + struct request rq; + u8 args[7], *argbuf = args; + int ret = 0; + DECLARE_COMPLETION(wait); + + memset(&rq, 0, sizeof(rq)); + memset(args, 0, sizeof(args)); + + if (blk_queue_stopped(q)) + return -EIO; + + if (unload) { + argbuf[0] = 0xe1; + argbuf[1] = 0x44; + argbuf[3] = 0x4c; + argbuf[4] = 0x4e; + argbuf[5] = 0x55; + } else + argbuf[0] = 0xe0; + + /* Issue the park command & freeze */ + ide_init_drive_cmd(&rq); + + rq.cmd_type = REQ_TYPE_ATA_TASK; + rq.buffer = argbuf; + rq.end_io_data = &wait; + rq.end_io = ide_end_protect_rq; + + ret = ide_do_drive_cmd(drive, &rq, ide_next); + wait_for_completion(&wait); + rq.end_io_data = NULL; + + if (ret) + { + printk(KERN_DEBUG "ide_protect_queue(): Warning: head NOT parked!..\n"); + ide_unprotect_queue(q); + return ret; + } + + if (unload) { + if (args[3] == 0xc4) + printk(KERN_DEBUG "ide_protect_queue(): head parked..\n"); + else { + /* error parking the head */ + printk(KERN_DEBUG "ide_protect_queue(): head NOT parked!..\n"); + ret = -EIO; + ide_unprotect_queue(q); + } + } else + printk(KERN_DEBUG "ide_protect_queue(): head park not requested, used standby!..\n"); + + return ret; +} + +int idedisk_issue_protect_fn(request_queue_t *q) +{ + ide_drive_t *drive = q->queuedata; + int unload; + + /* + * Check capability of the device - + * - if "idle immediate with unload" is supported we use that, else + * we use "standby immediate" and live with spinning down the drive.. + * (Word 84, bit 13 of IDENTIFY DEVICE data) + */ + if (idedisk_protect_method == 1) { + unload = 1; + printk(KERN_DEBUG "idedisk_issue_protect_fn(): unload method requested, overriding drive capability check..\n"); + } + else if (idedisk_protect_method == 2) { + unload = 0; + printk(KERN_DEBUG "idedisk_issue_protect_fn(): standby method requested, overriding drive capability check..\n"); + } + else if (drive->id->cfsse & (1 << 13)) { + unload = 1; + printk(KERN_DEBUG "idedisk_issue_protect_fn(): unload support reported by drive..\n"); + } + else { + unload = 0; + printk(KERN_DEBUG "idedisk_issue_protect_fn(): unload support NOT reported by drive!..\n"); + } + + return ide_protect_queue(q, unload); +} + +int idedisk_issue_unprotect_fn(request_queue_t *q) +{ + return ide_unprotect_queue(q); +} + +/* * This is tightly woven into the driver->do_special can not touch. * DON'T do it again until a total personality rewrite is committed. */ @@ -986,6 +1138,9 @@ drive->wcache = 1; write_cache(drive, 1); + + blk_queue_issue_protect_fn(drive->queue, idedisk_issue_protect_fn); + blk_queue_issue_unprotect_fn(drive->queue, idedisk_issue_unprotect_fn); } static void ide_cacheflush_p(ide_drive_t *drive) diff -urN newtree/drivers/ide/ide-disk.c.orig newtree.2/drivers/ide/ide-disk.c.orig --- newtree/drivers/ide/ide-disk.c.orig 1969-12-31 19:00:00.000000000 -0500 +++ newtree.2/drivers/ide/ide-disk.c.orig 2006-09-17 10:21:47.000000000 -0400 @@ -0,0 +1,1250 @@ +/* + * linux/drivers/ide/ide-disk.c Version 1.18 Mar 05, 2003 + * + * Copyright (C) 1994-1998 Linus Torvalds & authors (see below) + * Copyright (C) 1998-2002 Linux ATA Development + * Andre Hedrick + * Copyright (C) 2003 Red Hat + */ + +/* + * Mostly written by Mark Lord + * and Gadi Oxman + * and Andre Hedrick + * + * This is the IDE/ATA disk driver, as evolved from hd.c and ide.c. + * + * Version 1.00 move disk only code from ide.c to ide-disk.c + * support optional byte-swapping of all data + * Version 1.01 fix previous byte-swapping code + * Version 1.02 remove ", LBA" from drive identification msgs + * Version 1.03 fix display of id->buf_size for big-endian + * Version 1.04 add /proc configurable settings and S.M.A.R.T support + * Version 1.05 add capacity support for ATA3 >= 8GB + * Version 1.06 get boot-up messages to show full cyl count + * Version 1.07 disable door-locking if it fails + * Version 1.08 fixed CHS/LBA translations for ATA4 > 8GB, + * process of adding new ATA4 compliance. + * fixed problems in allowing fdisk to see + * the entire disk. + * Version 1.09 added increment of rq->sector in ide_multwrite + * added UDMA 3/4 reporting + * Version 1.10 request queue changes, Ultra DMA 100 + * Version 1.11 added 48-bit lba + * Version 1.12 adding taskfile io access method + * Version 1.13 added standby and flush-cache for notifier + * Version 1.14 added acoustic-wcache + * Version 1.15 convert all calls to ide_raw_taskfile + * since args will return register content. + * Version 1.16 added suspend-resume-checkpower + * Version 1.17 do flush on standby, do flush on ATA < ATA6 + * fix wcache setup. + */ + +#define IDEDISK_VERSION "1.18" + +#undef REALLY_SLOW_IO /* most systems can safely undef this */ + +//#define DEBUG + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define _IDE_DISK + +#include + +#include +#include +#include +#include +#include + +struct ide_disk_obj { + ide_drive_t *drive; + ide_driver_t *driver; + struct gendisk *disk; + struct kref kref; +}; + +static DEFINE_MUTEX(idedisk_ref_mutex); + +#define to_ide_disk(obj) container_of(obj, struct ide_disk_obj, kref) + +#define ide_disk_g(disk) \ + container_of((disk)->private_data, struct ide_disk_obj, driver) + +static struct ide_disk_obj *ide_disk_get(struct gendisk *disk) +{ + struct ide_disk_obj *idkp = NULL; + + mutex_lock(&idedisk_ref_mutex); + idkp = ide_disk_g(disk); + if (idkp) + kref_get(&idkp->kref); + mutex_unlock(&idedisk_ref_mutex); + return idkp; +} + +static void ide_disk_release(struct kref *); + +static void ide_disk_put(struct ide_disk_obj *idkp) +{ + mutex_lock(&idedisk_ref_mutex); + kref_put(&idkp->kref, ide_disk_release); + mutex_unlock(&idedisk_ref_mutex); +} + +/* + * lba_capacity_is_ok() performs a sanity check on the claimed "lba_capacity" + * value for this drive (from its reported identification information). + * + * Returns: 1 if lba_capacity looks sensible + * 0 otherwise + * + * It is called only once for each drive. + */ +static int lba_capacity_is_ok (struct hd_driveid *id) +{ + unsigned long lba_sects, chs_sects, head, tail; + + /* No non-LBA info .. so valid! */ + if (id->cyls == 0) + return 1; + + /* + * The ATA spec tells large drives to return + * C/H/S = 16383/16/63 independent of their size. + * Some drives can be jumpered to use 15 heads instead of 16. + * Some drives can be jumpered to use 4092 cyls instead of 16383. + */ + if ((id->cyls == 16383 + || (id->cyls == 4092 && id->cur_cyls == 16383)) && + id->sectors == 63 && + (id->heads == 15 || id->heads == 16) && + (id->lba_capacity >= 16383*63*id->heads)) + return 1; + + lba_sects = id->lba_capacity; + chs_sects = id->cyls * id->heads * id->sectors; + + /* perform a rough sanity check on lba_sects: within 10% is OK */ + if ((lba_sects - chs_sects) < chs_sects/10) + return 1; + + /* some drives have the word order reversed */ + head = ((lba_sects >> 16) & 0xffff); + tail = (lba_sects & 0xffff); + lba_sects = (head | (tail << 16)); + if ((lba_sects - chs_sects) < chs_sects/10) { + id->lba_capacity = lba_sects; + return 1; /* lba_capacity is (now) good */ + } + + return 0; /* lba_capacity value may be bad */ +} + +/* + * __ide_do_rw_disk() issues READ and WRITE commands to a disk, + * using LBA if supported, or CHS otherwise, to address sectors. + */ +static ide_startstop_t __ide_do_rw_disk(ide_drive_t *drive, struct request *rq, sector_t block) +{ + ide_hwif_t *hwif = HWIF(drive); + unsigned int dma = drive->using_dma; + u8 lba48 = (drive->addressing == 1) ? 1 : 0; + task_ioreg_t command = WIN_NOP; + ata_nsector_t nsectors; + + nsectors.all = (u16) rq->nr_sectors; + + if (hwif->no_lba48_dma && lba48 && dma) { + if (block + rq->nr_sectors > 1ULL << 28) + dma = 0; + else + lba48 = 0; + } + + if (!dma) { + ide_init_sg_cmd(drive, rq); + ide_map_sg(drive, rq); + } + + if (IDE_CONTROL_REG) + hwif->OUTB(drive->ctl, IDE_CONTROL_REG); + + /* FIXME: SELECT_MASK(drive, 0) ? */ + + if (drive->select.b.lba) { + if (lba48) { + task_ioreg_t tasklets[10]; + + pr_debug("%s: LBA=0x%012llx\n", drive->name, + (unsigned long long)block); + + tasklets[0] = 0; + tasklets[1] = 0; + tasklets[2] = nsectors.b.low; + tasklets[3] = nsectors.b.high; + tasklets[4] = (task_ioreg_t) block; + tasklets[5] = (task_ioreg_t) (block>>8); + tasklets[6] = (task_ioreg_t) (block>>16); + tasklets[7] = (task_ioreg_t) (block>>24); + if (sizeof(block) == 4) { + tasklets[8] = (task_ioreg_t) 0; + tasklets[9] = (task_ioreg_t) 0; + } else { + tasklets[8] = (task_ioreg_t)((u64)block >> 32); + tasklets[9] = (task_ioreg_t)((u64)block >> 40); + } +#ifdef DEBUG + printk("%s: 0x%02x%02x 0x%02x%02x%02x%02x%02x%02x\n", + drive->name, tasklets[3], tasklets[2], + tasklets[9], tasklets[8], tasklets[7], + tasklets[6], tasklets[5], tasklets[4]); +#endif + hwif->OUTB(tasklets[1], IDE_FEATURE_REG); + hwif->OUTB(tasklets[3], IDE_NSECTOR_REG); + hwif->OUTB(tasklets[7], IDE_SECTOR_REG); + hwif->OUTB(tasklets[8], IDE_LCYL_REG); + hwif->OUTB(tasklets[9], IDE_HCYL_REG); + + hwif->OUTB(tasklets[0], IDE_FEATURE_REG); + hwif->OUTB(tasklets[2], IDE_NSECTOR_REG); + hwif->OUTB(tasklets[4], IDE_SECTOR_REG); + hwif->OUTB(tasklets[5], IDE_LCYL_REG); + hwif->OUTB(tasklets[6], IDE_HCYL_REG); + hwif->OUTB(0x00|drive->select.all,IDE_SELECT_REG); + } else { + hwif->OUTB(0x00, IDE_FEATURE_REG); + hwif->OUTB(nsectors.b.low, IDE_NSECTOR_REG); + hwif->OUTB(block, IDE_SECTOR_REG); + hwif->OUTB(block>>=8, IDE_LCYL_REG); + hwif->OUTB(block>>=8, IDE_HCYL_REG); + hwif->OUTB(((block>>8)&0x0f)|drive->select.all,IDE_SELECT_REG); + } + } else { + unsigned int sect,head,cyl,track; + track = (int)block / drive->sect; + sect = (int)block % drive->sect + 1; + hwif->OUTB(sect, IDE_SECTOR_REG); + head = track % drive->head; + cyl = track / drive->head; + + pr_debug("%s: CHS=%u/%u/%u\n", drive->name, cyl, head, sect); + + hwif->OUTB(0x00, IDE_FEATURE_REG); + hwif->OUTB(nsectors.b.low, IDE_NSECTOR_REG); + hwif->OUTB(cyl, IDE_LCYL_REG); + hwif->OUTB(cyl>>8, IDE_HCYL_REG); + hwif->OUTB(head|drive->select.all,IDE_SELECT_REG); + } + + if (dma) { + if (!hwif->dma_setup(drive)) { + if (rq_data_dir(rq)) { + command = lba48 ? WIN_WRITEDMA_EXT : WIN_WRITEDMA; + if (drive->vdma) + command = lba48 ? WIN_WRITE_EXT: WIN_WRITE; + } else { + command = lba48 ? WIN_READDMA_EXT : WIN_READDMA; + if (drive->vdma) + command = lba48 ? WIN_READ_EXT: WIN_READ; + } + hwif->dma_exec_cmd(drive, command); + hwif->dma_start(drive); + return ide_started; + } + /* fallback to PIO */ + ide_init_sg_cmd(drive, rq); + } + + if (rq_data_dir(rq) == READ) { + + if (drive->mult_count) { + hwif->data_phase = TASKFILE_MULTI_IN; + command = lba48 ? WIN_MULTREAD_EXT : WIN_MULTREAD; + } else { + hwif->data_phase = TASKFILE_IN; + command = lba48 ? WIN_READ_EXT : WIN_READ; + } + + ide_execute_command(drive, command, &task_in_intr, WAIT_CMD, NULL); + return ide_started; + } else { + if (drive->mult_count) { + hwif->data_phase = TASKFILE_MULTI_OUT; + command = lba48 ? WIN_MULTWRITE_EXT : WIN_MULTWRITE; + } else { + hwif->data_phase = TASKFILE_OUT; + command = lba48 ? WIN_WRITE_EXT : WIN_WRITE; + } + + /* FIXME: ->OUTBSYNC ? */ + hwif->OUTB(command, IDE_COMMAND_REG); + + return pre_task_out_intr(drive, rq); + } +} + +/* + * 268435455 == 137439 MB or 28bit limit + * 320173056 == 163929 MB or 48bit addressing + * 1073741822 == 549756 MB or 48bit addressing fake drive + */ + +static ide_startstop_t ide_do_rw_disk (ide_drive_t *drive, struct request *rq, sector_t block) +{ + ide_hwif_t *hwif = HWIF(drive); + + BUG_ON(drive->blocked); + + if (!blk_fs_request(rq)) { + blk_dump_rq_flags(rq, "ide_do_rw_disk - bad command"); + ide_end_request(drive, 0, 0); + return ide_stopped; + } + + ledtrig_ide_activity(); + + pr_debug("%s: %sing: block=%llu, sectors=%lu, buffer=0x%08lx\n", + drive->name, rq_data_dir(rq) == READ ? "read" : "writ", + (unsigned long long)block, rq->nr_sectors, + (unsigned long)rq->buffer); + + if (hwif->rw_disk) + hwif->rw_disk(drive, rq); + + return __ide_do_rw_disk(drive, rq, block); +} + +/* + * Queries for true maximum capacity of the drive. + * Returns maximum LBA address (> 0) of the drive, 0 if failed. + */ +static unsigned long idedisk_read_native_max_address(ide_drive_t *drive) +{ + ide_task_t args; + unsigned long addr = 0; + + /* Create IDE/ATA command request structure */ + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_SELECT_OFFSET] = 0x40; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_READ_NATIVE_MAX; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + /* submit command request */ + ide_raw_taskfile(drive, &args, NULL); + + /* if OK, compute maximum address value */ + if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) { + addr = ((args.tfRegister[IDE_SELECT_OFFSET] & 0x0f) << 24) + | ((args.tfRegister[ IDE_HCYL_OFFSET] ) << 16) + | ((args.tfRegister[ IDE_LCYL_OFFSET] ) << 8) + | ((args.tfRegister[IDE_SECTOR_OFFSET] )); + addr++; /* since the return value is (maxlba - 1), we add 1 */ + } + return addr; +} + +static unsigned long long idedisk_read_native_max_address_ext(ide_drive_t *drive) +{ + ide_task_t args; + unsigned long long addr = 0; + + /* Create IDE/ATA command request structure */ + memset(&args, 0, sizeof(ide_task_t)); + + args.tfRegister[IDE_SELECT_OFFSET] = 0x40; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_READ_NATIVE_MAX_EXT; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + /* submit command request */ + ide_raw_taskfile(drive, &args, NULL); + + /* if OK, compute maximum address value */ + if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) { + u32 high = (args.hobRegister[IDE_HCYL_OFFSET] << 16) | + (args.hobRegister[IDE_LCYL_OFFSET] << 8) | + args.hobRegister[IDE_SECTOR_OFFSET]; + u32 low = ((args.tfRegister[IDE_HCYL_OFFSET])<<16) | + ((args.tfRegister[IDE_LCYL_OFFSET])<<8) | + (args.tfRegister[IDE_SECTOR_OFFSET]); + addr = ((__u64)high << 24) | low; + addr++; /* since the return value is (maxlba - 1), we add 1 */ + } + return addr; +} + +/* + * Sets maximum virtual LBA address of the drive. + * Returns new maximum virtual LBA address (> 0) or 0 on failure. + */ +static unsigned long idedisk_set_max_address(ide_drive_t *drive, unsigned long addr_req) +{ + ide_task_t args; + unsigned long addr_set = 0; + + addr_req--; + /* Create IDE/ATA command request structure */ + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_SECTOR_OFFSET] = ((addr_req >> 0) & 0xff); + args.tfRegister[IDE_LCYL_OFFSET] = ((addr_req >> 8) & 0xff); + args.tfRegister[IDE_HCYL_OFFSET] = ((addr_req >> 16) & 0xff); + args.tfRegister[IDE_SELECT_OFFSET] = ((addr_req >> 24) & 0x0f) | 0x40; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SET_MAX; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + /* submit command request */ + ide_raw_taskfile(drive, &args, NULL); + /* if OK, read new maximum address value */ + if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) { + addr_set = ((args.tfRegister[IDE_SELECT_OFFSET] & 0x0f) << 24) + | ((args.tfRegister[ IDE_HCYL_OFFSET] ) << 16) + | ((args.tfRegister[ IDE_LCYL_OFFSET] ) << 8) + | ((args.tfRegister[IDE_SECTOR_OFFSET] )); + addr_set++; + } + return addr_set; +} + +static unsigned long long idedisk_set_max_address_ext(ide_drive_t *drive, unsigned long long addr_req) +{ + ide_task_t args; + unsigned long long addr_set = 0; + + addr_req--; + /* Create IDE/ATA command request structure */ + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_SECTOR_OFFSET] = ((addr_req >> 0) & 0xff); + args.tfRegister[IDE_LCYL_OFFSET] = ((addr_req >>= 8) & 0xff); + args.tfRegister[IDE_HCYL_OFFSET] = ((addr_req >>= 8) & 0xff); + args.tfRegister[IDE_SELECT_OFFSET] = 0x40; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SET_MAX_EXT; + args.hobRegister[IDE_SECTOR_OFFSET] = (addr_req >>= 8) & 0xff; + args.hobRegister[IDE_LCYL_OFFSET] = (addr_req >>= 8) & 0xff; + args.hobRegister[IDE_HCYL_OFFSET] = (addr_req >>= 8) & 0xff; + args.hobRegister[IDE_SELECT_OFFSET] = 0x40; + args.hobRegister[IDE_CONTROL_OFFSET_HOB]= (drive->ctl|0x80); + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + /* submit command request */ + ide_raw_taskfile(drive, &args, NULL); + /* if OK, compute maximum address value */ + if ((args.tfRegister[IDE_STATUS_OFFSET] & 0x01) == 0) { + u32 high = (args.hobRegister[IDE_HCYL_OFFSET] << 16) | + (args.hobRegister[IDE_LCYL_OFFSET] << 8) | + args.hobRegister[IDE_SECTOR_OFFSET]; + u32 low = ((args.tfRegister[IDE_HCYL_OFFSET])<<16) | + ((args.tfRegister[IDE_LCYL_OFFSET])<<8) | + (args.tfRegister[IDE_SECTOR_OFFSET]); + addr_set = ((__u64)high << 24) | low; + addr_set++; + } + return addr_set; +} + +static unsigned long long sectors_to_MB(unsigned long long n) +{ + n <<= 9; /* make it bytes */ + do_div(n, 1000000); /* make it MB */ + return n; +} + +/* + * Bits 10 of command_set_1 and cfs_enable_1 must be equal, + * so on non-buggy drives we need test only one. + * However, we should also check whether these fields are valid. + */ +static inline int idedisk_supports_hpa(const struct hd_driveid *id) +{ + return (id->command_set_1 & 0x0400) && (id->cfs_enable_1 & 0x0400); +} + +/* + * The same here. + */ +static inline int idedisk_supports_lba48(const struct hd_driveid *id) +{ + return (id->command_set_2 & 0x0400) && (id->cfs_enable_2 & 0x0400) + && id->lba_capacity_2; +} + +static void idedisk_check_hpa(ide_drive_t *drive) +{ + unsigned long long capacity, set_max; + int lba48 = idedisk_supports_lba48(drive->id); + + capacity = drive->capacity64; + if (lba48) + set_max = idedisk_read_native_max_address_ext(drive); + else + set_max = idedisk_read_native_max_address(drive); + + if (set_max <= capacity) + return; + + printk(KERN_INFO "%s: Host Protected Area detected.\n" + "\tcurrent capacity is %llu sectors (%llu MB)\n" + "\tnative capacity is %llu sectors (%llu MB)\n", + drive->name, + capacity, sectors_to_MB(capacity), + set_max, sectors_to_MB(set_max)); + + if (lba48) + set_max = idedisk_set_max_address_ext(drive, set_max); + else + set_max = idedisk_set_max_address(drive, set_max); + if (set_max) { + drive->capacity64 = set_max; + printk(KERN_INFO "%s: Host Protected Area disabled.\n", + drive->name); + } +} + +/* + * Compute drive->capacity, the full capacity of the drive + * Called with drive->id != NULL. + * + * To compute capacity, this uses either of + * + * 1. CHS value set by user (whatever user sets will be trusted) + * 2. LBA value from target drive (require new ATA feature) + * 3. LBA value from system BIOS (new one is OK, old one may break) + * 4. CHS value from system BIOS (traditional style) + * + * in above order (i.e., if value of higher priority is available, + * reset will be ignored). + */ +static void init_idedisk_capacity (ide_drive_t *drive) +{ + struct hd_driveid *id = drive->id; + /* + * If this drive supports the Host Protected Area feature set, + * then we may need to change our opinion about the drive's capacity. + */ + int hpa = idedisk_supports_hpa(id); + + if (idedisk_supports_lba48(id)) { + /* drive speaks 48-bit LBA */ + drive->select.b.lba = 1; + drive->capacity64 = id->lba_capacity_2; + if (hpa) + idedisk_check_hpa(drive); + } else if ((id->capability & 2) && lba_capacity_is_ok(id)) { + /* drive speaks 28-bit LBA */ + drive->select.b.lba = 1; + drive->capacity64 = id->lba_capacity; + if (hpa) + idedisk_check_hpa(drive); + } else { + /* drive speaks boring old 28-bit CHS */ + drive->capacity64 = drive->cyl * drive->head * drive->sect; + } +} + +static sector_t idedisk_capacity (ide_drive_t *drive) +{ + return drive->capacity64 - drive->sect0; +} + +#ifdef CONFIG_PROC_FS + +static int smart_enable(ide_drive_t *drive) +{ + ide_task_t args; + + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_FEATURE_OFFSET] = SMART_ENABLE; + args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; + args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + return ide_raw_taskfile(drive, &args, NULL); +} + +static int get_smart_values(ide_drive_t *drive, u8 *buf) +{ + ide_task_t args; + + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_FEATURE_OFFSET] = SMART_READ_VALUES; + args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; + args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; + args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; + args.command_type = IDE_DRIVE_TASK_IN; + args.data_phase = TASKFILE_IN; + args.handler = &task_in_intr; + (void) smart_enable(drive); + return ide_raw_taskfile(drive, &args, buf); +} + +static int get_smart_thresholds(ide_drive_t *drive, u8 *buf) +{ + ide_task_t args; + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_FEATURE_OFFSET] = SMART_READ_THRESHOLDS; + args.tfRegister[IDE_NSECTOR_OFFSET] = 0x01; + args.tfRegister[IDE_LCYL_OFFSET] = SMART_LCYL_PASS; + args.tfRegister[IDE_HCYL_OFFSET] = SMART_HCYL_PASS; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SMART; + args.command_type = IDE_DRIVE_TASK_IN; + args.data_phase = TASKFILE_IN; + args.handler = &task_in_intr; + (void) smart_enable(drive); + return ide_raw_taskfile(drive, &args, buf); +} + +static int proc_idedisk_read_cache + (char *page, char **start, off_t off, int count, int *eof, void *data) +{ + ide_drive_t *drive = (ide_drive_t *) data; + char *out = page; + int len; + + if (drive->id_read) + len = sprintf(out,"%i\n", drive->id->buf_size / 2); + else + len = sprintf(out,"(none)\n"); + PROC_IDE_READ_RETURN(page,start,off,count,eof,len); +} + +static int proc_idedisk_read_capacity + (char *page, char **start, off_t off, int count, int *eof, void *data) +{ + ide_drive_t*drive = (ide_drive_t *)data; + int len; + + len = sprintf(page,"%llu\n", (long long)idedisk_capacity(drive)); + PROC_IDE_READ_RETURN(page,start,off,count,eof,len); +} + +static int proc_idedisk_read_smart_thresholds + (char *page, char **start, off_t off, int count, int *eof, void *data) +{ + ide_drive_t *drive = (ide_drive_t *)data; + int len = 0, i = 0; + + if (!get_smart_thresholds(drive, page)) { + unsigned short *val = (unsigned short *) page; + char *out = ((char *)val) + (SECTOR_WORDS * 4); + page = out; + do { + out += sprintf(out, "%04x%c", le16_to_cpu(*val), (++i & 7) ? ' ' : '\n'); + val += 1; + } while (i < (SECTOR_WORDS * 2)); + len = out - page; + } + PROC_IDE_READ_RETURN(page,start,off,count,eof,len); +} + +static int proc_idedisk_read_smart_values + (char *page, char **start, off_t off, int count, int *eof, void *data) +{ + ide_drive_t *drive = (ide_drive_t *)data; + int len = 0, i = 0; + + if (!get_smart_values(drive, page)) { + unsigned short *val = (unsigned short *) page; + char *out = ((char *)val) + (SECTOR_WORDS * 4); + page = out; + do { + out += sprintf(out, "%04x%c", le16_to_cpu(*val), (++i & 7) ? ' ' : '\n'); + val += 1; + } while (i < (SECTOR_WORDS * 2)); + len = out - page; + } + PROC_IDE_READ_RETURN(page,start,off,count,eof,len); +} + +static ide_proc_entry_t idedisk_proc[] = { + { "cache", S_IFREG|S_IRUGO, proc_idedisk_read_cache, NULL }, + { "capacity", S_IFREG|S_IRUGO, proc_idedisk_read_capacity, NULL }, + { "geometry", S_IFREG|S_IRUGO, proc_ide_read_geometry, NULL }, + { "smart_values", S_IFREG|S_IRUSR, proc_idedisk_read_smart_values, NULL }, + { "smart_thresholds", S_IFREG|S_IRUSR, proc_idedisk_read_smart_thresholds, NULL }, + { NULL, 0, NULL, NULL } +}; + +#else + +#define idedisk_proc NULL + +#endif /* CONFIG_PROC_FS */ + +static void idedisk_prepare_flush(request_queue_t *q, struct request *rq) +{ + ide_drive_t *drive = q->queuedata; + + memset(rq->cmd, 0, sizeof(rq->cmd)); + + if (ide_id_has_flush_cache_ext(drive->id) && + (drive->capacity64 >= (1UL << 28))) + rq->cmd[0] = WIN_FLUSH_CACHE_EXT; + else + rq->cmd[0] = WIN_FLUSH_CACHE; + + + rq->cmd_type = REQ_TYPE_ATA_TASK; + rq->cmd_flags |= REQ_SOFTBARRIER; + rq->buffer = rq->cmd; +} + +static int idedisk_issue_flush(request_queue_t *q, struct gendisk *disk, + sector_t *error_sector) +{ + ide_drive_t *drive = q->queuedata; + struct request *rq; + int ret; + + if (!drive->wcache) + return 0; + + rq = blk_get_request(q, WRITE, __GFP_WAIT); + + idedisk_prepare_flush(q, rq); + + ret = blk_execute_rq(q, disk, rq, 0); + + /* + * if we failed and caller wants error offset, get it + */ + if (ret && error_sector) + *error_sector = ide_get_error_location(drive, rq->cmd); + + blk_put_request(rq); + return ret; +} + +/* + * This is tightly woven into the driver->do_special can not touch. + * DON'T do it again until a total personality rewrite is committed. + */ +static int set_multcount(ide_drive_t *drive, int arg) +{ + struct request rq; + + if (drive->special.b.set_multmode) + return -EBUSY; + ide_init_drive_cmd (&rq); + rq.cmd_type = REQ_TYPE_ATA_CMD; + drive->mult_req = arg; + drive->special.b.set_multmode = 1; + (void) ide_do_drive_cmd (drive, &rq, ide_wait); + return (drive->mult_count == arg) ? 0 : -EIO; +} + +static int set_nowerr(ide_drive_t *drive, int arg) +{ + if (ide_spin_wait_hwgroup(drive)) + return -EBUSY; + drive->nowerr = arg; + drive->bad_wstat = arg ? BAD_R_STAT : BAD_W_STAT; + spin_unlock_irq(&ide_lock); + return 0; +} + +static void update_ordered(ide_drive_t *drive) +{ + struct hd_driveid *id = drive->id; + unsigned ordered = QUEUE_ORDERED_NONE; + prepare_flush_fn *prep_fn = NULL; + issue_flush_fn *issue_fn = NULL; + + if (drive->wcache) { + unsigned long long capacity; + int barrier; + /* + * We must avoid issuing commands a drive does not + * understand or we may crash it. We check flush cache + * is supported. We also check we have the LBA48 flush + * cache if the drive capacity is too large. By this + * time we have trimmed the drive capacity if LBA48 is + * not available so we don't need to recheck that. + */ + capacity = idedisk_capacity(drive); + barrier = ide_id_has_flush_cache(id) && !drive->noflush && + (drive->addressing == 0 || capacity <= (1ULL << 28) || + ide_id_has_flush_cache_ext(id)); + + printk(KERN_INFO "%s: cache flushes %ssupported\n", + drive->name, barrier ? "" : "not "); + + if (barrier) { + ordered = QUEUE_ORDERED_DRAIN_FLUSH; + prep_fn = idedisk_prepare_flush; + issue_fn = idedisk_issue_flush; + } + } else + ordered = QUEUE_ORDERED_DRAIN; + + blk_queue_ordered(drive->queue, ordered, prep_fn); + blk_queue_issue_flush_fn(drive->queue, issue_fn); +} + +static int write_cache(ide_drive_t *drive, int arg) +{ + ide_task_t args; + int err = 1; + + if (ide_id_has_flush_cache(drive->id)) { + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_FEATURE_OFFSET] = (arg) ? + SETFEATURES_EN_WCACHE : SETFEATURES_DIS_WCACHE; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SETFEATURES; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + err = ide_raw_taskfile(drive, &args, NULL); + if (err == 0) + drive->wcache = arg; + } + + update_ordered(drive); + + return err; +} + +static int do_idedisk_flushcache (ide_drive_t *drive) +{ + ide_task_t args; + + memset(&args, 0, sizeof(ide_task_t)); + if (ide_id_has_flush_cache_ext(drive->id)) + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_FLUSH_CACHE_EXT; + else + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_FLUSH_CACHE; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + return ide_raw_taskfile(drive, &args, NULL); +} + +static int set_acoustic (ide_drive_t *drive, int arg) +{ + ide_task_t args; + + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_FEATURE_OFFSET] = (arg) ? SETFEATURES_EN_AAM : + SETFEATURES_DIS_AAM; + args.tfRegister[IDE_NSECTOR_OFFSET] = arg; + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_SETFEATURES; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + ide_raw_taskfile(drive, &args, NULL); + drive->acoustic = arg; + return 0; +} + +/* + * drive->addressing: + * 0: 28-bit + * 1: 48-bit + * 2: 48-bit capable doing 28-bit + */ +static int set_lba_addressing(ide_drive_t *drive, int arg) +{ + drive->addressing = 0; + + if (HWIF(drive)->no_lba48) + return 0; + + if (!idedisk_supports_lba48(drive->id)) + return -EIO; + drive->addressing = arg; + return 0; +} + +static void idedisk_add_settings(ide_drive_t *drive) +{ + struct hd_driveid *id = drive->id; + + ide_add_setting(drive, "bios_cyl", SETTING_RW, -1, -1, TYPE_INT, 0, 65535, 1, 1, &drive->bios_cyl, NULL); + ide_add_setting(drive, "bios_head", SETTING_RW, -1, -1, TYPE_BYTE, 0, 255, 1, 1, &drive->bios_head, NULL); + ide_add_setting(drive, "bios_sect", SETTING_RW, -1, -1, TYPE_BYTE, 0, 63, 1, 1, &drive->bios_sect, NULL); + ide_add_setting(drive, "address", SETTING_RW, HDIO_GET_ADDRESS, HDIO_SET_ADDRESS, TYPE_INTA, 0, 2, 1, 1, &drive->addressing, set_lba_addressing); + ide_add_setting(drive, "bswap", SETTING_READ, -1, -1, TYPE_BYTE, 0, 1, 1, 1, &drive->bswap, NULL); + ide_add_setting(drive, "multcount", id ? SETTING_RW : SETTING_READ, HDIO_GET_MULTCOUNT, HDIO_SET_MULTCOUNT, TYPE_BYTE, 0, id ? id->max_multsect : 0, 1, 1, &drive->mult_count, set_multcount); + ide_add_setting(drive, "nowerr", SETTING_RW, HDIO_GET_NOWERR, HDIO_SET_NOWERR, TYPE_BYTE, 0, 1, 1, 1, &drive->nowerr, set_nowerr); + ide_add_setting(drive, "lun", SETTING_RW, -1, -1, TYPE_INT, 0, 7, 1, 1, &drive->lun, NULL); + ide_add_setting(drive, "wcache", SETTING_RW, HDIO_GET_WCACHE, HDIO_SET_WCACHE, TYPE_BYTE, 0, 1, 1, 1, &drive->wcache, write_cache); + ide_add_setting(drive, "acoustic", SETTING_RW, HDIO_GET_ACOUSTIC, HDIO_SET_ACOUSTIC, TYPE_BYTE, 0, 254, 1, 1, &drive->acoustic, set_acoustic); + ide_add_setting(drive, "failures", SETTING_RW, -1, -1, TYPE_INT, 0, 65535, 1, 1, &drive->failures, NULL); + ide_add_setting(drive, "max_failures", SETTING_RW, -1, -1, TYPE_INT, 0, 65535, 1, 1, &drive->max_failures, NULL); +} + +static void idedisk_setup (ide_drive_t *drive) +{ + struct hd_driveid *id = drive->id; + unsigned long long capacity; + + idedisk_add_settings(drive); + + if (drive->id_read == 0) + return; + + if (drive->removable) { + /* + * Removable disks (eg. SYQUEST); ignore 'WD' drives + */ + if (id->model[0] != 'W' || id->model[1] != 'D') { + drive->doorlocking = 1; + } + } + + (void)set_lba_addressing(drive, 1); + + if (drive->addressing == 1) { + ide_hwif_t *hwif = HWIF(drive); + int max_s = 2048; + + if (max_s > hwif->rqsize) + max_s = hwif->rqsize; + + blk_queue_max_sectors(drive->queue, max_s); + } + + printk(KERN_INFO "%s: max request size: %dKiB\n", drive->name, drive->queue->max_sectors / 2); + + /* calculate drive capacity, and select LBA if possible */ + init_idedisk_capacity (drive); + + /* limit drive capacity to 137GB if LBA48 cannot be used */ + if (drive->addressing == 0 && drive->capacity64 > 1ULL << 28) { + printk(KERN_WARNING "%s: cannot use LBA48 - full capacity " + "%llu sectors (%llu MB)\n", + drive->name, (unsigned long long)drive->capacity64, + sectors_to_MB(drive->capacity64)); + drive->capacity64 = 1ULL << 28; + } + + if (drive->hwif->no_lba48_dma && drive->addressing) { + if (drive->capacity64 > 1ULL << 28) { + printk(KERN_INFO "%s: cannot use LBA48 DMA - PIO mode will" + " be used for accessing sectors > %u\n", + drive->name, 1 << 28); + } else + drive->addressing = 0; + } + + /* + * if possible, give fdisk access to more of the drive, + * by correcting bios_cyls: + */ + capacity = idedisk_capacity (drive); + if (!drive->forced_geom) { + + if (idedisk_supports_lba48(drive->id)) { + /* compatibility */ + drive->bios_sect = 63; + drive->bios_head = 255; + } + + if (drive->bios_sect && drive->bios_head) { + unsigned int cap0 = capacity; /* truncate to 32 bits */ + unsigned int cylsz, cyl; + + if (cap0 != capacity) + drive->bios_cyl = 65535; + else { + cylsz = drive->bios_sect * drive->bios_head; + cyl = cap0 / cylsz; + if (cyl > 65535) + cyl = 65535; + if (cyl > drive->bios_cyl) + drive->bios_cyl = cyl; + } + } + } + printk(KERN_INFO "%s: %llu sectors (%llu MB)", + drive->name, capacity, sectors_to_MB(capacity)); + + /* Only print cache size when it was specified */ + if (id->buf_size) + printk (" w/%dKiB Cache", id->buf_size/2); + + printk(", CHS=%d/%d/%d", + drive->bios_cyl, drive->bios_head, drive->bios_sect); + if (drive->using_dma) + ide_dma_verbose(drive); + printk("\n"); + + /* write cache enabled? */ + if ((id->csfo & 1) || (id->cfs_enable_1 & (1 << 5))) + drive->wcache = 1; + + write_cache(drive, 1); +} + +static void ide_cacheflush_p(ide_drive_t *drive) +{ + if (!drive->wcache || !ide_id_has_flush_cache(drive->id)) + return; + + if (do_idedisk_flushcache(drive)) + printk(KERN_INFO "%s: wcache flush failed!\n", drive->name); +} + +static void ide_disk_remove(ide_drive_t *drive) +{ + struct ide_disk_obj *idkp = drive->driver_data; + struct gendisk *g = idkp->disk; + + ide_unregister_subdriver(drive, idkp->driver); + + del_gendisk(g); + + ide_cacheflush_p(drive); + + ide_disk_put(idkp); +} + +static void ide_disk_release(struct kref *kref) +{ + struct ide_disk_obj *idkp = to_ide_disk(kref); + ide_drive_t *drive = idkp->drive; + struct gendisk *g = idkp->disk; + + drive->driver_data = NULL; + g->private_data = NULL; + put_disk(g); + kfree(idkp); +} + +static int ide_disk_probe(ide_drive_t *drive); + +static void ide_device_shutdown(ide_drive_t *drive) +{ +#ifdef CONFIG_ALPHA + /* On Alpha, halt(8) doesn't actually turn the machine off, + it puts you into the sort of firmware monitor. Typically, + it's used to boot another kernel image, so it's not much + different from reboot(8). Therefore, we don't need to + spin down the disk in this case, especially since Alpha + firmware doesn't handle disks in standby mode properly. + On the other hand, it's reasonably safe to turn the power + off when the shutdown process reaches the firmware prompt, + as the firmware initialization takes rather long time - + at least 10 seconds, which should be sufficient for + the disk to expire its write cache. */ + if (system_state != SYSTEM_POWER_OFF) { +#else + if (system_state == SYSTEM_RESTART) { +#endif + ide_cacheflush_p(drive); + return; + } + + printk("Shutdown: %s\n", drive->name); + drive->gendev.bus->suspend(&drive->gendev, PMSG_SUSPEND); +} + +static ide_driver_t idedisk_driver = { + .gen_driver = { + .owner = THIS_MODULE, + .name = "ide-disk", + .bus = &ide_bus_type, + }, + .probe = ide_disk_probe, + .remove = ide_disk_remove, + .shutdown = ide_device_shutdown, + .version = IDEDISK_VERSION, + .media = ide_disk, + .supports_dsc_overlap = 0, + .do_request = ide_do_rw_disk, + .end_request = ide_end_request, + .error = __ide_error, + .abort = __ide_abort, + .proc = idedisk_proc, +}; + +static int idedisk_open(struct inode *inode, struct file *filp) +{ + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_disk_obj *idkp; + ide_drive_t *drive; + + if (!(idkp = ide_disk_get(disk))) + return -ENXIO; + + drive = idkp->drive; + + drive->usage++; + if (drive->removable && drive->usage == 1) { + ide_task_t args; + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORLOCK; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + check_disk_change(inode->i_bdev); + /* + * Ignore the return code from door_lock, + * since the open() has already succeeded, + * and the door_lock is irrelevant at this point. + */ + if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL)) + drive->doorlocking = 0; + } + return 0; +} + +static int idedisk_release(struct inode *inode, struct file *filp) +{ + struct gendisk *disk = inode->i_bdev->bd_disk; + struct ide_disk_obj *idkp = ide_disk_g(disk); + ide_drive_t *drive = idkp->drive; + + if (drive->usage == 1) + ide_cacheflush_p(drive); + if (drive->removable && drive->usage == 1) { + ide_task_t args; + memset(&args, 0, sizeof(ide_task_t)); + args.tfRegister[IDE_COMMAND_OFFSET] = WIN_DOORUNLOCK; + args.command_type = IDE_DRIVE_TASK_NO_DATA; + args.handler = &task_no_data_intr; + if (drive->doorlocking && ide_raw_taskfile(drive, &args, NULL)) + drive->doorlocking = 0; + } + drive->usage--; + + ide_disk_put(idkp); + + return 0; +} + +static int idedisk_getgeo(struct block_device *bdev, struct hd_geometry *geo) +{ + struct ide_disk_obj *idkp = ide_disk_g(bdev->bd_disk); + ide_drive_t *drive = idkp->drive; + + geo->heads = drive->bios_head; + geo->sectors = drive->bios_sect; + geo->cylinders = (u16)drive->bios_cyl; /* truncate */ + return 0; +} + +static int idedisk_ioctl(struct inode *inode, struct file *file, + unsigned int cmd, unsigned long arg) +{ + struct block_device *bdev = inode->i_bdev; + struct ide_disk_obj *idkp = ide_disk_g(bdev->bd_disk); + return generic_ide_ioctl(idkp->drive, file, bdev, cmd, arg); +} + +static int idedisk_media_changed(struct gendisk *disk) +{ + struct ide_disk_obj *idkp = ide_disk_g(disk); + ide_drive_t *drive = idkp->drive; + + /* do not scan partitions twice if this is a removable device */ + if (drive->attach) { + drive->attach = 0; + return 0; + } + /* if removable, always assume it was changed */ + return drive->removable; +} + +static int idedisk_revalidate_disk(struct gendisk *disk) +{ + struct ide_disk_obj *idkp = ide_disk_g(disk); + set_capacity(disk, idedisk_capacity(idkp->drive)); + return 0; +} + +static struct block_device_operations idedisk_ops = { + .owner = THIS_MODULE, + .open = idedisk_open, + .release = idedisk_release, + .ioctl = idedisk_ioctl, + .getgeo = idedisk_getgeo, + .media_changed = idedisk_media_changed, + .revalidate_disk= idedisk_revalidate_disk +}; + +MODULE_DESCRIPTION("ATA DISK Driver"); + +static int ide_disk_probe(ide_drive_t *drive) +{ + struct ide_disk_obj *idkp; + struct gendisk *g; + + /* strstr("foo", "") is non-NULL */ + if (!strstr("ide-disk", drive->driver_req)) + goto failed; + if (!drive->present) + goto failed; + if (drive->media != ide_disk) + goto failed; + + idkp = kzalloc(sizeof(*idkp), GFP_KERNEL); + if (!idkp) + goto failed; + + g = alloc_disk_node(1 << PARTN_BITS, + hwif_to_node(drive->hwif)); + if (!g) + goto out_free_idkp; + + ide_init_disk(g, drive); + + ide_register_subdriver(drive, &idedisk_driver); + + kref_init(&idkp->kref); + + idkp->drive = drive; + idkp->driver = &idedisk_driver; + idkp->disk = g; + + g->private_data = &idkp->driver; + + drive->driver_data = idkp; + + idedisk_setup(drive); + if ((!drive->head || drive->head > 16) && !drive->select.b.lba) { + printk(KERN_ERR "%s: INVALID GEOMETRY: %d PHYSICAL HEADS?\n", + drive->name, drive->head); + drive->attach = 0; + } else + drive->attach = 1; + + g->minors = 1 << PARTN_BITS; + g->driverfs_dev = &drive->gendev; + g->flags = drive->removable ? GENHD_FL_REMOVABLE : 0; + set_capacity(g, idedisk_capacity(drive)); + g->fops = &idedisk_ops; + add_disk(g); + return 0; + +out_free_idkp: + kfree(idkp); +failed: + return -ENODEV; +} + +static void __exit idedisk_exit (void) +{ + driver_unregister(&idedisk_driver.gen_driver); +} + +static int __init idedisk_init(void) +{ + return driver_register(&idedisk_driver.gen_driver); +} + +MODULE_ALIAS("ide:*m-disk*"); +module_init(idedisk_init); +module_exit(idedisk_exit); +MODULE_LICENSE("GPL"); diff -urN newtree/drivers/ide/ide-io.c newtree.2/drivers/ide/ide-io.c --- newtree/drivers/ide/ide-io.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/drivers/ide/ide-io.c 2006-09-17 09:25:04.000000000 -0400 @@ -1261,6 +1261,17 @@ } /* + * Don't accept a request when the queue is stopped (unless we + * are resuming from suspend). Prevents existing queue entries + * being processed after queue is stopped by the hard disk + * protection mechanism... + */ + if (test_bit(QUEUE_FLAG_STOPPED, &drive->queue->queue_flags) && !blk_pm_resume_request(rq)) { + hwgroup->busy = 0; + break; + } + + /* * Sanity: don't accept a request that isn't a PM request * if we are currently power managed. This is very important as * blk_stop_queue() doesn't prevent the elv_next_request() @@ -1744,6 +1755,9 @@ where = ELEVATOR_INSERT_FRONT; rq->cmd_flags |= REQ_PREEMPT; } + if (action == ide_next) + where = ELEVATOR_INSERT_FRONT; + __elv_add_request(drive->queue, rq, where, 0); ide_do_request(hwgroup, IDE_NO_IRQ); spin_unlock_irqrestore(&ide_lock, flags); diff -urN newtree/drivers/scsi/scsi_lib.c newtree.2/drivers/scsi/scsi_lib.c --- newtree/drivers/scsi/scsi_lib.c 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/drivers/scsi/scsi_lib.c 2006-09-17 11:18:40.000000000 -0400 @@ -2220,6 +2220,109 @@ } EXPORT_SYMBOL_GPL(scsi_target_unblock); +/* + * scsi_unprotect_queue() + * - release the queue that was previously blocked + */ +int scsi_unprotect_queue(request_queue_t *q){ + + struct scsi_device *sdev = q->queuedata; + int rc = 0, pending = 0; + u8 scsi_cmd[MAX_COMMAND_SIZE]; + struct scsi_sense_hdr sshdr; + + if (sdev->sdev_state != SDEV_BLOCK) + return -ENXIO; + + /* Are there any pending jobs on the queue? */ + pending = ((q->rq.count[READ] > 0) || (q->rq.count[WRITE] > 0)) ? 1 : 0; + + rc = scsi_internal_device_unblock(sdev); + if (rc) + return rc; + + if (!pending) { + printk(KERN_DEBUG "scsi_unprotect_queue(): No pending I/O, re-enabling power management..\n"); + + memset(scsi_cmd, 0, sizeof(scsi_cmd)); + scsi_cmd[0] = ATA_16; + scsi_cmd[1] = (3 << 1); /* Non-data */ + /* scsi_cmd[2] is already 0 -- no off.line, cc, or data xfer */ + scsi_cmd[14] = 0xe5; /* CHECK_POWER_MODE1 */ + + /* Good values for timeout and retries? Values below + from scsi_ioctl_send_command() for default case... */ + if (scsi_execute_req(sdev, scsi_cmd, DMA_NONE, NULL, 0, &sshdr, + (10*HZ), 5)) + rc = -EIO; + } + return rc; +} +EXPORT_SYMBOL_GPL(scsi_unprotect_queue); + +/* + * scsi_protect_queue() + * - build and issue the park/standby command.. + * - queue is blocked during command completion handler + */ +int scsi_protect_queue(request_queue_t *q, int unload) +{ + struct scsi_device *sdev = q->queuedata; + int rc = 0; + u8 scsi_cmd[MAX_COMMAND_SIZE]; + u8 args[7]; + unsigned char *sb, *desc; + + if (sdev->sdev_state != SDEV_RUNNING) + return -ENXIO; + + memset(args, 0, sizeof(args)); + + if (unload) { + args[0] = 0xe1; + args[1] = 0x44; + args[3] = 0x4c; + args[4] = 0x4e; + args[5] = 0x55; + } else + args[0] = 0xe0; + + memset(scsi_cmd, 0, sizeof(scsi_cmd)); + scsi_cmd[0] = ATA_16; + scsi_cmd[1] = (3 << 1); /* Non-data */ + scsi_cmd[2] = 0x20; /* no off.line, or data xfer, request cc */ + scsi_cmd[4] = args[1]; + scsi_cmd[6] = args[2]; + scsi_cmd[8] = args[3]; + scsi_cmd[10] = args[4]; + scsi_cmd[12] = args[5]; + scsi_cmd[14] = args[0]; + + desc = sb + 8; + + /* Retrieve data from check condition */ + args[1] = desc[3]; + args[2] = desc[5]; + args[3] = desc[7]; + args[4] = desc[9]; + args[5] = desc[11]; + args[0] = desc[13]; + + if (unload) { + if (args[3] == 0xc4) + printk(KERN_DEBUG "scsi_protect_queue(): head parked..\n"); + else { + /* error parking the head */ + printk(KERN_DEBUG "scsi_protect_queue(): head NOT parked!..\n"); + rc = -EIO; + scsi_unprotect_queue(q); + } + } else + printk(KERN_DEBUG "scsi_protect_queue(): head park not requested, used standby!..\n"); + return rc; +} +EXPORT_SYMBOL_GPL(scsi_protect_queue); + /** * scsi_kmap_atomic_sg - find and atomically map an sg-elemnt * @sg: scatter-gather list diff -urN newtree/id newtree.2/id --- newtree/id 1969-12-31 19:00:00.000000000 -0500 +++ newtree.2/id 2006-09-17 09:58:32.000000000 -0400 @@ -0,0 +1,824 @@ +../linux-2.6.17-gentoo-r8/drivers/base/attribute_container.c: struct device *dev = classdev->dev; +../linux-2.6.17-gentoo-r8/drivers/base/memory.c: * This only works because we know that section == sysdev->id +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: struct sysdev_class * cls = sysdev->cls; +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: sysdev->kobj.kset = &cls->kset; +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: sysdev->kobj.ktype = &ktype_sysdev; +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: error = kobject_set_name(&sysdev->kobj, "%s%d", +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: kobject_name(&cls->kset.kobj), sysdev->id); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: pr_debug("Registering sys device '%s'\n", kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: error = kobject_register(&sysdev->kobj); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: list_for_each_entry(drv, &sysdev->cls->drivers, entry) { +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: kobject_unregister(&sysdev->kobj); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: pr_debug(" %s\n", kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: pr_debug(" %s\n", kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/sys.c: pr_debug(" %s\n", kobject_name(&sysdev->kobj)); +../linux-2.6.17-gentoo-r8/drivers/base/transport_class.c: error = sysfs_create_group(&classdev->kobj, tcont->statistics); +../linux-2.6.17-gentoo-r8/drivers/base/transport_class.c: sysfs_remove_group(&classdev->kobj, tcont->statistics); +../linux-2.6.17-gentoo-r8/drivers/cpufreq/cpufreq.c: int cpu = sysdev->id; +../linux-2.6.17-gentoo-r8/drivers/cpufreq/cpufreq.c: int cpu = sysdev->id; +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: bsizes = (prom_getintdefault(sdev->prom_node,"burst-sizes",0xff) & 0xff); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: bsizes_more = (prom_getintdefault(sdev->bus->prom_node, "burst-sizes", 0xff) & 0xff); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: propl = prom_getproperty (sdev->prom_node, "soc-wwn", tmp, sizeof(tmp)); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: propl = prom_getproperty (sdev->prom_node, "port-wwns", tmp, sizeof(tmp)); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: if (sdev->num_registers == 1) { +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: s->xram = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: s->regs = sbus_ioremap(&sdev->resource[0], 0x10000UL, +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: s->xram = sbus_ioremap(&sdev->resource[1], 0, +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: sdev->reg_addrs[1].reg_size, "soc xram"); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: s->regs = sbus_ioremap(&sdev->resource[2], 0, +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: sdev->reg_addrs[2].reg_size, "soc regs"); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: if(!strcmp(sdev->prom_name, "SUNW,soc")) { +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: if (sdev->num_registers == 1) { +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: sbus_iounmap(s->xram, sdev->reg_addrs[1].reg_size); +../linux-2.6.17-gentoo-r8/drivers/fc4/soc.c: sbus_iounmap(s->regs, sdev->reg_addrs[2].reg_size); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: bsizes = (prom_getintdefault(sdev->prom_node,"burst-sizes",0xff) & 0xff); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: bsizes_more = (prom_getintdefault(sdev->bus->prom_node, "burst-sizes", 0xff) & 0xff); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: propl = prom_getproperty (sdev->prom_node, "wwn", tmp, sizeof(tmp)); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: node = prom_getchild (sdev->prom_node); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: if (sdev->num_registers == 1) { +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: s->eeprom = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: sdev->reg_addrs[0].reg_size, "socal xram"); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: if (sdev->reg_addrs[0].reg_size > 0x20000) +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: s->xram = sbus_ioremap(&sdev->resource[1], 0, +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: sdev->reg_addrs[1].reg_size, "socal xram"); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: s->regs = sbus_ioremap(&sdev->resource[2], 0, +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: sdev->reg_addrs[2].reg_size, "socal regs"); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: if(!strcmp(sdev->prom_name, "SUNW,socal")) { +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: if (sdev->num_registers == 1) { +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: sbus_iounmap(s->eeprom, sdev->reg_addrs[0].reg_size); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: sbus_iounmap(s->xram, sdev->reg_addrs[1].reg_size); +../linux-2.6.17-gentoo-r8/drivers/fc4/socal.c: sbus_iounmap(s->regs, sdev->reg_addrs[2].reg_size); +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: (struct scsi_id_instance_data *)sdev->host->hostdata[0]; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: sdev->inquiry_len = 36; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: (struct scsi_id_instance_data *)sdev->host->hostdata[0]; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: blk_queue_dma_alignment(sdev->request_queue, (512 - 1)); +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: sdev->use_10_for_rw = 1; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: sdev->use_10_for_ms = 1; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: if (sdev->type == TYPE_DISK && +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: sdev->skip_ms_page_8 = 1; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: sdev->fix_capacity = 1; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: (sdev->type == TYPE_DISK || sdev->type == TYPE_RBC)) +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: sdev->allow_restart = 1; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: ((struct scsi_id_instance_data *)sdev->host->hostdata[0])->sdev = NULL; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/sbp2.c: if (!(scsi_id = (struct scsi_id_instance_data *)sdev->host->hostdata[0])) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (!list->tsdev->open++) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (list->tsdev->exist) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: input_open_device(&list->tsdev->handle); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev_table[tsdev->minor] = NULL; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (!--list->tsdev->open) { +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (list->tsdev->exist) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: input_close_device(&list->tsdev->handle); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (list->head == list->tail && list->tsdev->exist && (file->f_flags & O_NONBLOCK)) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: retval = wait_event_interruptible(list->tsdev->wait, +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: list->head != list->tail || !list->tsdev->exist); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (!list->tsdev->exist) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: poll_wait(file, &list->tsdev->wait, wait); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: (list->tsdev->exist ? 0 : (POLLHUP | POLLERR)); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (copy_to_user ((void __user *)arg, &tsdev->cal, +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (copy_from_user (&tsdev->cal, (void __user *)arg, +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->x = value; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->y = value; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->pressure = value; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->x += value; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (tsdev->x < 0) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->x = 0; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: else if (tsdev->x > xres) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->x = xres; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->y += value; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (tsdev->y < 0) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->y = 0; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: else if (tsdev->y > yres) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->y = yres; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->pressure = 0; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (!tsdev->pressure) +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->pressure = 1; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: list_for_each_entry(list, &tsdev->list, node) { +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: list->event[list->head].pressure = tsdev->pressure; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: x = tsdev->x; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: y = tsdev->y; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: x = ((x * tsdev->cal.xscale) >> 8) + tsdev->cal.xtrans; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: y = ((y * tsdev->cal.yscale) >> 8) + tsdev->cal.ytrans; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (tsdev->cal.xyswap) { +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: wake_up_interruptible(&tsdev->wait); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: INIT_LIST_HEAD(&tsdev->list); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: init_waitqueue_head(&tsdev->wait); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: sprintf(tsdev->name, "ts%d", minor); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->exist = 1; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->minor = minor; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->handle.dev = dev; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->handle.name = tsdev->name; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->handle.handler = handler; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->handle.private = tsdev; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->cal.xscale = (xres << 8) / delta; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->cal.xtrans = - ((dev->absmin [ABS_X] * tsdev->cal.xscale) >> 8); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->cal.yscale = (yres << 8) / delta; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->cal.ytrans = - ((dev->absmin [ABS_Y] * tsdev->cal.yscale) >> 8); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: dev->cdev.dev, tsdev->name); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->name); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: return &tsdev->handle; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: sysfs_remove_link(&input_class.subsys.kset.kobj, tsdev->name); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: MKDEV(INPUT_MAJOR, TSDEV_MINOR_BASE + tsdev->minor)); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: tsdev->exist = 0; +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: if (tsdev->open) { +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: wake_up_interruptible(&tsdev->wait); +../linux-2.6.17-gentoo-r8/drivers/input/tsdev.c: list_for_each_entry(list, &tsdev->list, node) +../linux-2.6.17-gentoo-r8/drivers/macintosh/macio_asic.c: for (np = NULL; (np = of_get_next_child(sdev->ofdev.node, np)) +../linux-2.6.17-gentoo-r8/drivers/macintosh/macio_asic.c: if (macio_add_one_device(chip, &sdev->ofdev.dev, np, +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: i = prom_getproperty(sdev->prom_node, "myrinet-eeprom-info", +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->eeprom.cpuvers = prom_getintdefault(sdev->prom_node,"cpu_version",0); +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->eeprom.cval = prom_getintdefault(sdev->prom_node,"clock_value",0); +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->eeprom.ramsz = prom_getintdefault(sdev->prom_node,"sram_size",0); +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: i = prom_getproperty(sdev->prom_node, "myrinet-board-id", +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: i = prom_getproperty(sdev->prom_node, "fpga_version", +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->regs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->cregs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->lregs = sbus_ioremap(&sdev->resource[0], (256 * 1024), +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: sbus_ioremap(&sdev->resource[0], (512 * 1024), +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: mp->myri_bursts = prom_getintdefault(mp->myri_sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: i = prom_getint(sdev->prom_node, "interrupts"); +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: dev->irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: char *name = sdev->prom_name; +../linux-2.6.17-gentoo-r8/drivers/net/myri_sbus.c: DET(("Found myricom myrinet as %s\n", sdev->prom_name)); +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: sbus_writel(qec_sdev->reg_addrs[1].reg_size, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: sbus_writel(qec_sdev->reg_addrs[1].reg_size >> 1, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: sbus_writel(qec_sdev->reg_addrs[1].reg_size >> 1, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->qec_sdev->slot); +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->bigmac_sdev = qec_sdev->child; +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: if ((bp->bigmac_sdev->num_registers != 3) || +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: (bp->qec_sdev->num_registers != 2)) { +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->qec_sdev->num_registers, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->bigmac_sdev->num_registers); +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->gregs = sbus_ioremap(&bp->qec_sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bsizes = prom_getintdefault(bp->qec_sdev->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bsizes_more = prom_getintdefault(bp->qec_sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->creg = sbus_ioremap(&bp->bigmac_sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->bregs = sbus_ioremap(&bp->bigmac_sdev->resource[1], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->tregs = sbus_ioremap(&bp->bigmac_sdev->resource[2], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: bp->board_rev = prom_getintdefault(bp->bigmac_sdev->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: dev->irq = bp->bigmac_sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: struct sbus_dev *child = sdev->child; +../linux-2.6.17-gentoo-r8/drivers/net/sunbmac.c: if (strcmp(sdev->prom_name, "qec") != 0) +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: sdev->slot); +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: err = prom_getproperty(sdev->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: if (sdev->reg_addrs[reg].which_io == +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: sdev->reg_addrs[reg].which_io = rngp->ot_parent_space; +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: sdev->reg_addrs[reg].phys_addr += rngp->ot_parent_base; +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: sdev = sdev->next, i++) { +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: err = request_irq(sdev->irqs[0], +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: prom_getproplen(sdev->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: prom_getproperty(sdev->prom_node, "local-mac-address", +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: if (sdev->num_registers != 5) { +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: sdev->num_registers); +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->gregs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->etxregs = sbus_ioremap(&sdev->resource[1], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->erxregs = sbus_ioremap(&sdev->resource[2], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->bigmacregs = sbus_ioremap(&sdev->resource[3], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->tcvregs = sbus_ioremap(&sdev->resource[4], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->hm_revision = prom_getintdefault(sdev->prom_node, "hm-rev", 0xff); +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: hp->happy_bursts = prom_getintdefault(sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: dev->irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: busdev->vendor != PCI_VENDOR_ID_DEC || +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: busdev->device != PCI_DEVICE_ID_DEC_21153) +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: char *name = sdev->prom_name; +../linux-2.6.17-gentoo-r8/drivers/net/sunhme.c: prom_getstring(sdev->prom_node, "model", +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: lp->sdev->slot); +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: lp->lregs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: lp->busmaster_regval = prom_getintdefault(sdev->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: lp->burst_sizes = prom_getintdefault(ledma->sdev->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: sbmask = prom_getintdefault(ledma->sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: prom_getstring(ledma->sdev->prom_node, "cable-selection", +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: dev->irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: if (strcmp(sdev->prom_name, "le") == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: if (strcmp(sdev->prom_name, "ledma") == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: if ((v = sparc_lance_init(sdev->child, +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: if (strcmp(sdev->prom_name, "lebuffer") == 0){ +../linux-2.6.17-gentoo-r8/drivers/net/sunlance.c: if ((v = sparc_lance_init(sdev->child, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: qep->qe_sdev->slot); +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: sbus_writel((qsdev->reg_addrs[1].reg_size >> 2), +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: sbus_writel((qsdev->reg_addrs[1].reg_size >> 2) >> 1, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: sbus_writel((qsdev->reg_addrs[1].reg_size >> 2) >> 1, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: for (i = 0, child = sdev->child; i < 4; i++, child = child->next) { +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: qecp->gregs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: bsizes = prom_getintdefault(sdev->prom_node, "burst-sizes", 0xff); +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: bsizes_more = prom_getintdefault(sdev->bus->prom_node, "burst-sizes", 0xff); +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: qe->qcregs = sbus_ioremap(&qe->qe_sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: qe->mregs = sbus_ioremap(&qe->qe_sdev->resource[1], 0, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: qe_devs[i]->irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: if (request_irq(sdev->irqs[0], &qec_interrupt, +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: free_irq(sdev->irqs[0], (void *)qecp); +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: if (strcmp(sdev->prom_name, "qec") != 0) +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: sibling = sdev->child; +../linux-2.6.17-gentoo-r8/drivers/net/sunqe.c: free_irq(root_qec_dev->qec_sdev->irqs[0], (void *)root_qec_dev); +../linux-2.6.17-gentoo-r8/drivers/parport/parport_sunbpp.c: irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/parport/parport_sunbpp.c: base = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/parport/parport_sunbpp.c: sdev->reg_addrs[0].reg_size, +../linux-2.6.17-gentoo-r8/drivers/parport/parport_sunbpp.c: size = sdev->reg_addrs[0].reg_size; +../linux-2.6.17-gentoo-r8/drivers/parport/parport_sunbpp.c: if (!strcmp(sdev->prom_name, "SUNW,bpp")) +../linux-2.6.17-gentoo-r8/drivers/sbus/dvma.c: dma->regs = sbus_ioremap(&dma->sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/sbus/dvma.c: dma->sdev->resource[0].end - dma->sdev->resource[0].start + 1, +../linux-2.6.17-gentoo-r8/drivers/sbus/dvma.c: dma->node = dma->sdev->prom_node; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->prom_node = prom_node; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->prom_name, sizeof(sdev->prom_name)); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: (char *) sdev->reg_addrs, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sizeof(sdev->reg_addrs)); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_registers = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->prom_name, len, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->prom_name, len); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_registers = len / sizeof(struct linux_prom_registers); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->ranges_applied = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: base = (unsigned long) sdev->reg_addrs[0].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->slot = sbus_dev_slot(base); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->slot = sdev->reg_addrs[0].which_io; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: (char *)sdev->device_ranges, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sizeof(sdev->device_ranges)); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_device_ranges = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->prom_name, len, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->prom_name, len); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_device_ranges = +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[0] = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_irqs = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_irqs = 1; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: pri += sdev->slot * 8; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[0] = sbus_build_irq(sdev->bus, pri); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_irqs = len / 8; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: if (sdev->num_irqs == 0) { +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[0] = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: for (len = 0; len < sdev->num_irqs; len++) +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[len] = sun4d_build_irq(sdev, irqs[len].pri); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: for (len = 0; len < sdev->num_irqs; len++) +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[len] = irqs[len].pri; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[0] = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_irqs = 0; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_irqs = len / sizeof(int); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: for (len = 0; len < sdev->num_irqs; len++) { +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->irqs[len] = sbint_to_irq(sdev, interrupts[len]); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: if (sdev->num_registers != 0) { +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: struct sbus_dev *parent = sdev->parent; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->reg_addrs, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_registers); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: __apply_ranges_to_regs(sdev->bus->sbus_ranges, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->bus->num_sbus_ranges, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->reg_addrs, +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sdev->num_registers); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: for (i = 0; i < sdev->num_registers; i++) { +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: struct resource *res = &sdev->resource[i]; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: res->start = sdev->reg_addrs[i].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: (unsigned long)sdev->reg_addrs[i].reg_size - 1UL); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: (sdev->reg_addrs[i].which_io & 0xff); +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: for (sdev = first_sdev; sdev; sdev = sdev->next) { +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: if (sdev->child) +../linux-2.6.17-gentoo-r8/drivers/sbus/sbus.c: sbus_fixup_all_regs(sdev->child); +../linux-2.6.17-gentoo-r8/drivers/scsi/3w-9xxx.c: tw_dev = (TW_Device_Extension *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/3w-xxxx.c: tw_dev = (TW_Device_Extension *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/BusLogic.c: struct BusLogic_HostAdapter *HostAdapter = (struct BusLogic_HostAdapter *) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/NCR53C9x.c: struct esp_device *esp_dev = sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/NCR53C9x.c: uint id = sdev->id; +../linux-2.6.17-gentoo-r8/drivers/scsi/advansys.c: ASC_STATS(sdev->host, biosparam); +../linux-2.6.17-gentoo-r8/drivers/scsi/advansys.c: boardp = ASC_BOARDP(sdev->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/aha152x.c: struct Scsi_Host *shpnt = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/aha1542.c: translation_algorithm = HOSTDATA(sdev->host)->bios_translation; +../linux-2.6.17-gentoo-r8/drivers/scsi/aha1740.c: int extended = HOSTDATA(sdev->host)->translation; +../linux-2.6.17-gentoo-r8/drivers/scsi/aic7xxx_old.c: p = (struct aic7xxx_host *) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/dc395x.c: acb = (struct AdapterCtlBlk *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/dpt_i2o.c: if(sdev->type == 5) { // CDROM +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: if (sdev->bus == dma->sdev->bus && +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: sdev->slot == dma->sdev->slot && +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: (!strcmp(dma->sdev->prom_name, "dma") || +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: !strcmp(dma->sdev->prom_name, "espdma"))) +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: res = &sdev->resource[1]; +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: res = &sdev->resource[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: esp->ehost->irq = esp->irq = esp->sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: esp->scsi_id = (sdev->bus == NULL) ? 7 : +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: prom_getintdefault(sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: if (sdev != NULL && sdev->bus != NULL) +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: sbus_prom_node = sdev->bus->prom_node; +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: if (sdev->bus) { +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: u8 tmp = prom_getintdefault(sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: struct esp_device *esp_dev = sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/esp.c: uint id = sdev->id; +../linux-2.6.17-gentoo-r8/drivers/scsi/ide-scsi.c: idescsi_scsi_t *idescsi = scsihost_to_idescsi(sdev->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/initio.c: pHcb = (HCS *) sdev->host->base; +../linux-2.6.17-gentoo-r8/drivers/scsi/initio.c: pTcb = &pHcb->HCS_Tcs[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: return sdev->queue_depth; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: res = (struct ipr_resource_entry *)sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: if (ipr_is_gscsi(res) && sdev->tagged_supported) { +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: scsi_activate_tcq(sdev, sdev->queue_depth); +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: scsi_deactivate_tcq(sdev, sdev->queue_depth); +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: res = (struct ipr_resource_entry *)sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: res = (struct ipr_resource_entry *) sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->hostdata = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: res = sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->type = TYPE_RAID; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->scsi_level = 4; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->no_uld_attach = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->timeout = IPR_VSET_RW_TIMEOUT; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: blk_queue_max_sectors(sdev->request_queue, IPR_VSET_MAX_SECTORS); +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->allow_restart = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: struct ipr_ioa_cfg *ioa_cfg = (struct ipr_ioa_cfg *) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->hostdata = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: if ((res->cfgte.res_addr.bus == sdev->channel) && +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: (res->cfgte.res_addr.target == sdev->id) && +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: (res->cfgte.res_addr.lun == sdev->lun)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/ipr.c: sdev->hostdata = res; +../linux-2.6.17-gentoo-r8/drivers/scsi/ips.c: ips_ha_t *ha = (ips_ha_t *) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/iscsi_tcp.c: return sdev->queue_depth; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: struct ata_device *dev = &ap->device[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: struct ata_port *ap = (struct ata_port *) &sdev->host->hostdata[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: struct ata_device *dev = &ap->device[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: sdev->use_10_for_rw = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: sdev->use_10_for_ms = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: blk_queue_max_sectors(sdev->request_queue, max_sectors); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: request_queue_t *q = sdev->request_queue; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: blk_queue_max_phys_segments(sdev->request_queue, LIBATA_MAX_PRD); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: if (sdev->id < ATA_MAX_DEVICES) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap = (struct ata_port *) &sdev->host->hostdata[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: dev = &ap->device[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/megaraid.c: adapter = (adapter_t *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/megaraid.c: if (IS_RAID_CH(adapter, sdev->channel)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/megaraid.c: sdev->channel); +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: struct tcb *tp = &np->target[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: struct lcb *lp = tp->lp[sdev->lun]; +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: if ((sdev->id == np->myaddr ) || +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: (sdev->id >= MAX_TARGET) || +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: (sdev->lun >= MAX_LUN )) { +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: idmsg = IDENTIFY(0, sdev->lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: unsigned char tn = sdev->id, ln = sdev->lun; +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: if (sdev->tagged_supported && lp->numtags > 1) { +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: dev_info(&sdev->sdev_gendev, +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: dev_info(&sdev->sdev_gendev, +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: unsigned char tn = sdev->id, ln = sdev->lun; +../linux-2.6.17-gentoo-r8/drivers/scsi/ncr53c8xx.c: if (sdev->tagged_supported && lp->jump_ccb == &lp->jump_ccb_0) { +../linux-2.6.17-gentoo-r8/drivers/scsi/osst.c: if (sdev->host->hostt->compat_ioctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/osst.c: ret = sdev->host->hostt->compat_ioctl(sdev, cmd_in, (void __user *)arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/psi240i.c: pdev = &(HOSTDATA(sdev->host)->device[sdev_id(sdev)]); +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: qpti->qregs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: sdev->reg_addrs[0].reg_size, +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: qpti->sreg = sbus_ioremap(&sdev->resource[0], (16 * 4096), +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: qpti->qhost->irq = qpti->irq = sdev->irqs[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: prom_getintdefault(qpti->sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: bmask = prom_getintdefault(sdev->bus->prom_node, +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: if (strcmp(sdev->prom_name, "ptisp") && +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: strcmp(sdev->prom_name, "PTI,ptisp") && +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: strcmp(sdev->prom_name, "QLGC,isp") && +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: strcmp(sdev->prom_name, "SUNW,isp")) +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: if (sdev->irqs[0] == 0) { +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: qpti->prom_node = sdev->prom_node; +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: qpti->sdev->reg_addrs[0].reg_size); +../linux-2.6.17-gentoo-r8/drivers/scsi/qlogicpti.c: sbus_iounmap(qpti->qregs, qpti->sdev->reg_addrs[0].reg_size); +../linux-2.6.17-gentoo-r8/drivers/scsi/raid_class.c: if (i->f->cookie != sdev->host->hostt) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sreq->sr_host = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->host->hostt->queuecommand); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->host->host_busy, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->host->host_failed); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->device_blocked = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: spin_lock_irqsave(sdev->request_queue->queue_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (blk_queue_tagged(sdev->request_queue) && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: blk_queue_resize_tags(sdev->request_queue, tags) != 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->queue_depth = tags; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->ordered_tags = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->simple_tags = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->ordered_tags = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->simple_tags = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->ordered_tags = sdev->simple_tags = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->queue_depth = tags; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if ((jiffies >> 4) == sdev->last_queue_full_time) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->last_queue_full_time = (jiffies >> 4); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->last_queue_full_depth != depth) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->last_queue_full_count = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->last_queue_full_depth = depth; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->last_queue_full_count++; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->last_queue_full_count <= 10) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->last_queue_full_depth < 8) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->ordered_tags) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->sdev_state == SDEV_DEL || sdev->sdev_state == SDEV_CANCEL) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (!get_device(&sdev->sdev_gendev)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (!try_module_get(sdev->host->hostt->module)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: module_put(sdev->host->hostt->module); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if ((sdev->channel == starget->channel) && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: (sdev->id == starget->id)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->lun ==lun) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: if (sdev->channel == channel && sdev->id == id && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: sdev->lun ==lun) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: spin_lock_irqsave(&sdev->list_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: list_for_each_entry(scmd, &sdev->cmd_list, list) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi.c: spin_unlock_irqrestore(&sdev->list_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: (struct sdebug_dev_info *)sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: sdbg_host = *(struct sdebug_host_info **) sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: if ((devip->used) && (devip->channel == sdev->channel) && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: (devip->target == sdev->id) && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: (devip->lun == sdev->lun)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: open_devip->channel = sdev->channel; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: open_devip->target = sdev->id; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_debug.c: open_devip->lun = sdev->lun; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_devinfo.c: bflags = sdev->sdev_bflags; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: wait_event(sdev->host->host_wait, !scsi_host_in_recovery(sdev->host)); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: if (sdev->scsi_level <= SCSI_2) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: (sdev->lun << 5 & 0xe0); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: if (scsi_device_online(sdev) && sdev->locked) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: sdev->was_reset = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: sdev->expecting_cc_ua = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: sdev->was_reset = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_error.c: sdev->expecting_cc_ua = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: sdev->lockable = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: if (sdev->removable && (cmd[0] != TEST_UNIT_READY)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: if (sdev->removable) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: sdev->changed = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: if (!sdev->removable || !sdev->lockable) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: sdev->locked = (state == SCSI_REMOVAL_PREVENT); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: struct device *dev = scsi_get_device(sdev->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: __put_user((sdev->id & 0xff) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: + ((sdev->lun & 0xff) << 8) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: + ((sdev->channel & 0xff) << 16) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: + ((sdev->host->host_no & 0xff) << 24), +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: __put_user(sdev->host->unique_id, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: return put_user(sdev->host->host_no, (int __user *)arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: return ioctl_probe(sdev->host, arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: return sg_scsi_ioctl(NULL, sdev->request_queue, NULL, arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: if (sdev->host->hostt->ioctl) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: return sdev->host->hostt->ioctl(sdev, cmd, arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_ioctl.c: if (scsi_host_in_recovery(sdev->host)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: req = blk_get_request(sdev->request_queue, write, __GFP_WAIT); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (bufflen && blk_rq_map_kern(sdev->request_queue, req, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: req = blk_get_request(sdev->request_queue, write, gfp); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: spin_lock(sdev->request_queue->queue_lock); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->device_busy--; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: spin_unlock_irqrestore(sdev->request_queue->queue_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: struct Scsi_Host *shost = current_sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: blk_run_queue(current_sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: blk_run_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->single_lun) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: list_del_init(&sdev->starved_entry); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: blk_run_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (unlikely(!list_empty(&sdev->starved_entry))) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: struct request_queue *q = sdev->request_queue; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: get_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: scsi_run_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->sdev_state != SDEV_RUNNING) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: return drv->issue_flush(&sdev->sdev_gendev, error_sector); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (unlikely(sdev->sdev_state != SDEV_RUNNING)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->sdev_state == SDEV_DEL) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: specials_only = sdev->sdev_state; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->device_busy == 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->device_busy >= sdev->queue_depth) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->device_busy == 0 && sdev->device_blocked) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (--sdev->device_blocked == 0) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->device_blocked) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (list_empty(&sdev->starved_entry)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: list_add_tail(&sdev->starved_entry, &shost->starved_list); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (!list_empty(&sdev->starved_entry)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: list_del_init(&sdev->starved_entry); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->device_busy++; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: spin_unlock(sdev->request_queue->queue_lock); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: spin_lock(sdev->request_queue->queue_lock); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if(!get_device(&sdev->sdev_gendev)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->device_busy++; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->single_lun) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if(sdev->device_busy == 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->device_busy--; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if(sdev->device_busy == 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if (sdev->use_10_for_ms) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: use_10_for_ms = sdev->use_10_for_ms; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->use_10_for_ms = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: if ((driver_byte(result) & DRIVER_SENSE) && sdev->removable) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->changed = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: enum scsi_device_state oldstate = sdev->sdev_state; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: sdev->sdev_state = state; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: scsi_run_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: while (sdev->device_busy) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: scsi_run_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: scsi_run_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: request_queue_t *q = sdev->request_queue; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_lib.c: request_queue_t *q = sdev->request_queue; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: sdev->host->host_no, sdev->channel, sdev->id, sdev->lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: if (sdev->vendor[i] >= 0x20) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: seq_printf(s, "%c", sdev->vendor[i]); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: if (sdev->model[i] >= 0x20) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: seq_printf(s, "%c", sdev->model[i]); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: if (sdev->rev[i] >= 0x20) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: seq_printf(s, "%c", sdev->rev[i]); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: sdev->type < MAX_SCSI_DEVICE_CODE ? +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: scsi_device_types[(int) sdev->type] : "Unknown "); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: " SCSI revision: %02x", (sdev->scsi_level - 1) ? +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: sdev->scsi_level - 1 : 1); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_proc.c: if (sdev->scsi_level == 2) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->vendor = scsi_null_device_strs; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->model = scsi_null_device_strs; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->rev = scsi_null_device_strs; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->host = shost; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->id = starget->id; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->lun = lun; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->channel = starget->channel; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdev_state = SDEV_CREATED; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: INIT_LIST_HEAD(&sdev->siblings); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: INIT_LIST_HEAD(&sdev->same_target_siblings); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: INIT_LIST_HEAD(&sdev->cmd_list); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: INIT_LIST_HEAD(&sdev->starved_entry); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: spin_lock_init(&sdev->list_lock); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdev_gendev.parent = get_device(&starget->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdev_target = starget; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->hostdata = hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->max_device_blocked = SCSI_DEFAULT_DEVICE_BLOCKED; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->type = -1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->borken = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->request_queue = scsi_alloc_queue(sdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (!sdev->request_queue) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->request_queue->queuedata = sdev; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: transport_destroy_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: * transfer length of 36 unless sdev->inquiry_len specifies a +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: first_inquiry_len = sdev->inquiry_len ? sdev->inquiry_len : 36; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: else if (sdev->inquiry_len) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: next_inquiry_len = sdev->inquiry_len; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->inquiry_len = min(try_inquiry_len, response_len); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->scsi_level = inq_result[2] & 0x07; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->scsi_level >= 2 || +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: (sdev->scsi_level == 1 && (inq_result[3] & 0x0f) == 1)) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->scsi_level++; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdev_target->scsi_level = sdev->scsi_level; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->inquiry = kmalloc(sdev->inquiry_len, GFP_ATOMIC); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->inquiry == NULL) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: memcpy(sdev->inquiry, inq_result, sdev->inquiry_len); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->vendor = (char *) (sdev->inquiry + 8); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->model = (char *) (sdev->inquiry + 16); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->rev = (char *) (sdev->inquiry + 32); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: * It would be better to modify sdev->type, and set +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: * sdev->removable, but then the print_inquiry() output +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->no_uld_attach = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: switch (sdev->type = (inq_result[0] & 0x1f)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->writeable = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->writeable = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: printk(KERN_INFO "scsi: unknown device type %d\n", sdev->type); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->inq_periph_qual = (inq_result[0] >> 5) & 7; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->removable = (0x80 & inq_result[1]) >> 7; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->lockable = sdev->removable; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->soft_reset = (inq_result[7] & 1) && ((inq_result[3] & 7) == 2); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->scsi_level >= SCSI_3 || (sdev->inquiry_len > 56 && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->ppr = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->wdtr = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdtr = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if ((sdev->scsi_level >= SCSI_2) && (inq_result[7] & 2) && +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->tagged_supported = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->borken = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->select_no_atn = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: blk_queue_max_sectors(sdev->request_queue, 512); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->no_start_on_add = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->single_lun = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->use_10_for_rw = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->skip_ms_page_8 = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->skip_ms_page_3f = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->use_10_for_ms = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->use_192_bytes_for_3f = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->lockable = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->retry_hwerror = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: transport_configure_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->host->hostt->slave_configure) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: int ret = sdev->host->hostt->slave_configure(sdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->host->hostt->slave_destroy) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->host->hostt->slave_destroy(sdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: transport_destroy_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (rescan || sdev->sdev_state != SDEV_CREATED) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdev_gendev.bus_id)); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->vendor, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->model); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: * logical disk configured at sdev->lun, but there +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->lockable = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: shost->host_no, sdev->channel, sdev->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: (sdev->host->unchecked_isa_dma ? __GFP_DMA : 0)); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: } else if (lun > sdev->host->max_lun) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->sdev_state == SDEV_CREATED) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: if (sdev->sdev_state == SDEV_DEL) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->sdev_gendev.parent = get_device(&starget->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: sdev->borken = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_scan.c: BUG_ON(sdev->id != sdev->host->this_id); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: spin_lock_irqsave(sdev->host->host_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: list_del(&sdev->siblings); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: list_del(&sdev->same_target_siblings); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: list_del(&sdev->starved_entry); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: spin_unlock_irqrestore(sdev->host->host_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (sdev->request_queue) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->request_queue->queuedata = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: scsi_free_queue(sdev->request_queue); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->request_queue = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: kfree(sdev->inquiry); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct scsi_host_template *sht = sdev->host->hostt; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct scsi_host_template *sht = sdev->host->hostt; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: return snprintf (buf, 20, format_string, sdev->field); \ +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: snscanf (buf, 20, format_string, &sdev->field); \ +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->field = ret; \ +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: return snprintf (buf, 20, "%d\n", sdev->timeout / HZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->timeout = timeout * HZ; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: const char *name = scsi_device_state_name(sdev->sdev_state); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (sdev->ordered_tags) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: else if (sdev->simple_tags) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: unsigned long long count = atomic_read(&sdev->field); \ +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct scsi_host_template *sht = sdev->host->hostt; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct scsi_host_template *sht = sdev->host->hostt; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (!sdev->tagged_supported || !sht->change_queue_type) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: error = device_add(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: put_device(sdev->sdev_gendev.parent); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: error = class_device_add(&sdev->sdev_classdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: get_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (sdev->host->hostt->sdev_attrs) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: for (i = 0; sdev->host->hostt->sdev_attrs[i]; i++) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: error = attr_add(&sdev->sdev_gendev, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->host->hostt->sdev_attrs[i]); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (!attr_overridden(sdev->host->hostt->sdev_attrs, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: attr_changed_internally(sdev->host, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: error = device_create_file(&sdev->sdev_gendev, attr); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: transport_add_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: device_del(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: transport_destroy_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: put_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct device *dev = &sdev->sdev_gendev; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: class_device_unregister(&sdev->sdev_classdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (sdev->host->hostt->slave_destroy) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->host->hostt->slave_destroy(sdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: if (sdev->channel != starget->channel || +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->id != starget->id || +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->sdev_state == SDEV_DEL) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct Scsi_Host *shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: struct scsi_target *starget = sdev->sdev_target; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: device_initialize(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->sdev_gendev.bus = &scsi_bus_type; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->sdev_gendev.release = scsi_device_dev_release; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sprintf(sdev->sdev_gendev.bus_id,"%d:%d:%d:%d", +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->host->host_no, sdev->channel, sdev->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: class_device_initialize(&sdev->sdev_classdev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->sdev_classdev.dev = &sdev->sdev_gendev; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->sdev_classdev.class = &sdev_class; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: snprintf(sdev->sdev_classdev.class_id, BUS_ID_SIZE, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: "%d:%d:%d:%d", sdev->host->host_no, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->channel, sdev->id, sdev->lun); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: sdev->scsi_level = SCSI_2; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: transport_setup_device(&sdev->sdev_gendev); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: list_add_tail(&sdev->same_target_siblings, &starget->devices); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_sysfs.c: list_add_tail(&sdev->siblings, &shost->__devices); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_sas.c: struct sas_rphy *rphy = target_to_rphy(sdev->sdev_target); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: struct scsi_target *starget = sdev->sdev_target; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: i->f->set_##x(sdev->sdev_target, y) +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: const int len = sdev->inquiry_len; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: struct spi_internal *i = to_spi_internal(sdev->host->transportt); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: struct scsi_target *starget = sdev->sdev_target; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: i->f->get_period(sdev->sdev_target); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: struct spi_internal *i = to_spi_internal(sdev->host->transportt); +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: struct scsi_target *starget = sdev->sdev_target; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: int len = sdev->inquiry_len; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: spi_dv_retrain(sdev, buffer, buffer + sdev->inquiry_len, +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: struct scsi_target *starget = sdev->sdev_target; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: spi_dv_pending(sdev->sdev_target) = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: if (unlikely(spi_dv_pending(sdev->sdev_target))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: spi_dv_pending(sdev->sdev_target) = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: spi_dv_pending(sdev->sdev_target) = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: shost = sdev->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/scsi_transport_spi.c: if (i->f->deny_binding && i->f->deny_binding(sdev->sdev_target)) +../linux-2.6.17-gentoo-r8/drivers/scsi/sd.c: if (sdev->removable || sdkp->write_prot) +../linux-2.6.17-gentoo-r8/drivers/scsi/sd.c: if (sdev->removable && !sdkp->media_present && +../linux-2.6.17-gentoo-r8/drivers/scsi/sd.c: if (!sdkp->openers++ && sdev->removable) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sd.c: if (!--sdkp->openers && sdev->removable) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sd.c: if (sdev->host->hostt->compat_ioctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sd.c: ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/sg.c: if (sdev->host->hostt->compat_ioctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sg.c: ret = sdev->host->hostt->compat_ioctl(sdev, cmd_in, (void __user *)arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/sg.c: queue_dma_alignment(sdev->request_queue)) != 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/sr.c: if (sdev->type != TYPE_ROM && sdev->type != TYPE_WORM) +../linux-2.6.17-gentoo-r8/drivers/scsi/sr.c: sdev->sector_size = 2048; /* A guess, just in case */ +../linux-2.6.17-gentoo-r8/drivers/scsi/sr.c: disk->driverfs_dev = &sdev->sdev_gendev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sr.c: disk->queue = sdev->request_queue; +../linux-2.6.17-gentoo-r8/drivers/scsi/sr_ioctl.c: SDev->changed = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/st.c: if (sdev->host->hostt->compat_ioctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/st.c: ret = sdev->host->hostt->compat_ioctl(sdev, cmd, (void __user *)arg); +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: if ((pDCB->SyncMode & SYNC_ENABLE) && pDCB->TargetLUN == 0 && sdev->sdtr && +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: struct dc390_acb *acb = (struct dc390_acb *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: struct dc390_dcb *dcb = sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: if (sdev->queue_depth <= dcb->GoingSRBCnt) +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: struct dc390_acb *acb = (struct dc390_acb *)sdev->host->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: struct dc390_dcb *dcb = (struct dc390_dcb *)sdev->hostdata; +../linux-2.6.17-gentoo-r8/drivers/scsi/tmscsim.c: if (sdev->tagged_supported && (dcb->DevMode & TAG_QUEUEING_)) { +../linux-2.6.17-gentoo-r8/drivers/serial/sunzilog.c: if (sdev->prom_node == zsnode) +../linux-2.6.17-gentoo-r8/drivers/serial/sunzilog.c: sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/spi/spi_s3c24xx.c: return spi_master_get_devdata(sdev->master); +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: par->sdev->reg_addrs[0].which_io : +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: all->par.physbase = sdev->reg_addrs[0].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: resp = &sdev->resource[0]; +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: sbusfb_fill_var(&all->info.var, (sdev ? sdev->prom_node : 0), 1); +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: linebytes = prom_getintdefault(sdev->prom_node, "linebytes", +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: if (sdev && !prom_getbool(sdev->prom_node, "width")) +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: prom_getintdefault(sdev->prom_node, "address", 0); +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: (long) (sdev ? sdev->reg_addrs[0].which_io : 0), +../linux-2.6.17-gentoo-r8/drivers/video/bw2.c: if (!strcmp(sdev->prom_name, "bwtwo")) +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: name = par->sdev->prom_name; +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: rphys = sdev->reg_addrs[0].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: all->par.physbase = phys = sdev->reg_addrs[1].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: all->par.iospace = sdev->reg_addrs[0].which_io; +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: all->par.regs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: all->par.clut = sbus_ioremap(&sdev->resource[0], CG14_CLUT1, +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: all->par.cursor = sbus_ioremap(&sdev->resource[0], CG14_CURSORREGS, +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: all->info.screen_base = sbus_ioremap(&sdev->resource[1], 0, +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: if (!strcmp(sdev->prom_name, "cgfourteen")) +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: cg14_init_one(sdev, sdev->prom_node, sbus->prom_node); +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: par->sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: prom_getstring(sdev->prom_node, "params", buffer, sizeof(buffer)); +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: all->par.physbase = sdev->reg_addrs[0].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: if (!strcmp(sdev->prom_name, "cgRDI")) +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: linebytes = prom_getintdefault(sdev->prom_node, "linebytes", +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: all->par.regs = sbus_ioremap(&sdev->resource[0], CG3_REGS_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: prom_getintdefault(sdev->prom_node, "address", 0); +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: sbus_ioremap(&sdev->resource[0], CG3_RAM_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: if (!prom_getbool(sdev->prom_node, "width")) +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: sdev->prom_name, +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: (long) sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: (long) sdev->reg_addrs[0].phys_addr); +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: if (!strcmp(sdev->prom_name, "cgthree") || +../linux-2.6.17-gentoo-r8/drivers/video/cg3.c: !strcmp(sdev->prom_name, "cgRDI")) +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: par->sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: all->par.physbase = sdev->reg_addrs[0].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: linebytes = prom_getintdefault(sdev->prom_node, "linebytes", +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: if (prom_getbool(sdev->prom_node, "dblbuf")) +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: all->par.fbc = sbus_ioremap(&sdev->resource[0], CG6_FBC_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: all->par.tec = sbus_ioremap(&sdev->resource[0], CG6_TEC_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: all->par.thc = sbus_ioremap(&sdev->resource[0], CG6_THC_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: all->par.bt = sbus_ioremap(&sdev->resource[0], CG6_BROOKTREE_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: all->par.fhc = sbus_ioremap(&sdev->resource[0], CG6_FHC_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: prom_getintdefault(sdev->prom_node, "address", 0); +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: sbus_ioremap(&sdev->resource[0], CG6_RAM_OFFSET, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: (long) sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: (long) sdev->reg_addrs[0].phys_addr); +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: if (!strcmp(sdev->prom_name, "cgsix") || +../linux-2.6.17-gentoo-r8/drivers/video/cg6.c: !strcmp(sdev->prom_name, "cgthree+")) +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: par->sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: all->par.physbase = sdev->reg_addrs[0].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbusfb_fill_var(&all->info.var, sdev->prom_node, 32); +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: linebytes = prom_getintdefault(sdev->prom_node, "linebytes", +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: prom_getintdefault(sdev->prom_node, "address", 0); +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbus_ioremap(&sdev->resource[0], LEO_OFF_SS0, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbus_ioremap(&sdev->resource[0], LEO_OFF_LC_SS0_USR, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbus_ioremap(&sdev->resource[0], LEO_OFF_LD_SS0, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbus_ioremap(&sdev->resource[0], LEO_OFF_LD_SS1, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_KRN, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sbus_ioremap(&sdev->resource[0], LEO_OFF_LX_CURSOR, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: sdev->prom_name, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: (long) sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: (long) sdev->reg_addrs[0].phys_addr); +../linux-2.6.17-gentoo-r8/drivers/video/leo.c: if (!strcmp(sdev->prom_name, "leo")) +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: par->sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: strlcpy(info->fix.id, par->sdev->prom_name, sizeof(info->fix.id)); +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: all->par.physbase = sdev->reg_addrs[2].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: linebytes = prom_getintdefault(sdev->prom_node, "linebytes", +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: all->par.regs = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: prom_getintdefault(sdev->prom_node, "address", 0); +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: all->info.screen_base = sbus_ioremap(&sdev->resource[2], 0, +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: sdev->prom_name, +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: (long) sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: (long) sdev->reg_addrs[0].phys_addr); +../linux-2.6.17-gentoo-r8/drivers/video/p9100.c: if (!strcmp(sdev->prom_name, "p9100")) +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: par->sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->par.lowdepth = prom_getbool(sdev->prom_node, "tcx-8-bit"); +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: sbusfb_fill_var(&all->info.var, sdev->prom_node, 8); +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: linebytes = prom_getintdefault(sdev->prom_node, "linebytes", +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->par.tec = sbus_ioremap(&sdev->resource[7], 0, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->par.thc = sbus_ioremap(&sdev->resource[9], 0, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->par.bt = sbus_ioremap(&sdev->resource[8], 0, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->par.cplane = sbus_ioremap(&sdev->resource[4], 0, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->par.mmap_map[i].poff = sdev->reg_addrs[j].phys_addr; +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: prom_getintdefault(sdev->prom_node, "address", 0); +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: all->info.screen_base = sbus_ioremap(&sdev->resource[0], 0, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: sdev->prom_name, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: (long) sdev->reg_addrs[0].which_io, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: (long) sdev->reg_addrs[0].phys_addr, +../linux-2.6.17-gentoo-r8/drivers/video/tcx.c: if (!strcmp(sdev->prom_name, "SUNW,tcx")) diff -urN newtree/include/linux/ata.h newtree.2/include/linux/ata.h --- newtree/include/linux/ata.h 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/include/linux/ata.h 2006-09-17 09:25:10.000000000 -0400 @@ -283,6 +283,7 @@ #define ata_id_rahead_enabled(id) ((id)[85] & (1 << 6)) #define ata_id_wcache_enabled(id) ((id)[85] & (1 << 5)) #define ata_id_hpa_enabled(id) ((id)[85] & (1 << 10)) +#define ata_id_has_unload(id) ((id)[84] & (1 << 13)) #define ata_id_has_fua(id) ((id)[84] & (1 << 6)) #define ata_id_has_flush(id) ((id)[83] & (1 << 12)) #define ata_id_has_flush_ext(id) ((id)[83] & (1 << 13)) diff -urN newtree/include/linux/blkdev.h newtree.2/include/linux/blkdev.h --- newtree/include/linux/blkdev.h 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/include/linux/blkdev.h 2006-09-17 09:25:10.000000000 -0400 @@ -345,6 +345,8 @@ typedef int (issue_flush_fn) (request_queue_t *, struct gendisk *, sector_t *); typedef void (prepare_flush_fn) (request_queue_t *, struct request *); typedef void (softirq_done_fn)(struct request *); +typedef int (issue_protect_fn) (request_queue_t *); +typedef int (issue_unprotect_fn) (request_queue_t *); enum blk_queue_state { Queue_down, @@ -387,6 +389,8 @@ issue_flush_fn *issue_flush_fn; prepare_flush_fn *prepare_flush_fn; softirq_done_fn *softirq_done_fn; + issue_protect_fn *issue_protect_fn; + issue_unprotect_fn *issue_unprotect_fn; /* * Dispatch queue sorting @@ -740,6 +744,8 @@ extern unsigned blk_ordered_cur_seq(request_queue_t *); extern unsigned blk_ordered_req_seq(struct request *); extern void blk_ordered_complete_seq(request_queue_t *, unsigned, int); +extern void blk_queue_issue_protect_fn(request_queue_t *, issue_protect_fn *); +extern void blk_queue_issue_unprotect_fn(request_queue_t *, issue_unprotect_fn *); extern int blk_rq_map_sg(request_queue_t *, struct request *, struct scatterlist *); extern void blk_dump_rq_flags(struct request *, char *); diff -urN newtree/include/linux/ide.h newtree.2/include/linux/ide.h --- newtree/include/linux/ide.h 2006-09-17 05:38:20.000000000 -0400 +++ newtree.2/include/linux/ide.h 2006-09-17 09:25:10.000000000 -0400 @@ -1090,6 +1090,7 @@ */ typedef enum { ide_wait, /* insert rq at end of list, and wait for it */ + ide_next, /* insert rq immediately after current request */ ide_preempt, /* insert rq in front of current request */ ide_head_wait, /* insert rq in front of current request and wait for it */ ide_end /* insert rq at end of list, but don't wait for it */ diff -urN newtree/link newtree.2/link --- newtree/link 1969-12-31 19:00:00.000000000 -0500 +++ newtree.2/link 2006-09-17 09:58:44.000000000 -0400 @@ -0,0 +1,2466 @@ +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: if ((vc_map->vcc == NULL) || +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: (test_bit(ATM_VF_READY, &vc_map->vcc->flags) == 0)) { +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: ASSERT(vc_map->vcc); +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: if (vc_map->incarn != entry->incarn) { +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vcc = vc_map->vcc; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: if ((vc_map->vcc == NULL) || +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: (test_bit(ATM_VF_READY, &vc_map->vcc->flags) == 0)) { +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vcc = vc_map->vcc; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: if (vc_map->vcc) { +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vc_map->vcc = vcc; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vc_map->vcc = NULL; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vc_map->vcc = NULL; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vc_map->vcc = NULL; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vc_map->incarn = ++fore200e->incarn_count; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: vc_map->vcc = NULL; +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: ASSERT(vc_map->vcc == vcc); +../linux-2.6.17-gentoo-r8/drivers/atm/fore200e.c: entry->incarn = vc_map->incarn; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: rx_ch_desc * rx_desc = &memmap->rx_descs[channel]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: rx_ch_desc * rx_desc = &memmap->rx_descs[vc]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: rx_q_entry * wr_ptr = &memmap->rx_q_entries[rd_regw (dev, RX_QUEUE_WR_PTR_OFF)]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: tx_ch_desc * tx_desc = &memmap->tx_descs[tx_channel]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: tx_ch_desc * tx_desc = &memmap->tx_descs[chan]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: cell_buf * buf = &memmap->inittxbufs[chan]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: tx_desc = memmap->bufn3; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: wr_mem (dev, &memmap->txfreebufstart.next, BUF_PTR(tx_desc) | BUFF_STATUS_EMPTY); +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: wr_mem (dev, &tx_desc->next, BUF_PTR(&memmap->txfreebufend) | BUFF_STATUS_EMPTY); +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: rx_ch_desc * rx_desc = &memmap->rx_descs[chan]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: rx_desc = memmap->bufn4; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: wr_mem (dev, &memmap->rxfreebufstart.next, BUF_PTR(rx_desc) | BUFF_STATUS_EMPTY); +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: wr_mem (dev, &rx_desc->next, BUF_PTR(&memmap->rxfreebufend) | BUFF_STATUS_EMPTY); +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: dev->rx_q_entry = dev->rx_q_reset = &memmap->rx_q_entries[0]; +../linux-2.6.17-gentoo-r8/drivers/atm/horizon.c: dev->rx_q_wrap = &memmap->rx_q_entries[RX_CHANS-1]; +../linux-2.6.17-gentoo-r8/drivers/cdrom/sonycd535.c: * wrap-around is handled properly.) +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: head = (unsigned int) ap->txq.head; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: tail = (unsigned int) ap->txq.tail; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: if (tail != ((unsigned int) ap->txq.tail)) +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: tail = (unsigned int) ap->txq.tail; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: ap->txq.head = head; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: if (ap->changed.data & DT_TXEMPTY) +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: ap->changed.data &= ~DT_TXEMPTY; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: head = (unsigned int) ap->txq.head; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: tail = (unsigned int) ap->txq.tail; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: if (tail != ((unsigned int) ap->txq.tail)) +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: tail = (unsigned int) ap->txq.tail; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: ap->txq.head = head; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: if (ap->changed.data & DT_TXEMPTY) +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: ap->changed.data &= ~DT_TXEMPTY; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: cp = &ap->ctrl; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: if (ap->notify) { +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: nt = ap->changed; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: ap->notify = 0; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: portp->rxsize = ap->rxq.size; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: portp->txsize = ap->txq.size; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: portp->rxoffset = ap->rxq.offset; +../linux-2.6.17-gentoo-r8/drivers/char/istallion.c: portp->txoffset = ap->txq.offset; +../linux-2.6.17-gentoo-r8/drivers/char/mbcs.c: /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ +../linux-2.6.17-gentoo-r8/drivers/char/mem.c: /* Remap-pfn-range will mark the range VM_IO and VM_RESERVED */ +../linux-2.6.17-gentoo-r8/drivers/char/n_r3964.c: * http://www.pap-philips.de +../linux-2.6.17-gentoo-r8/drivers/fc4/fc.c: fc->posmap->len = p->len; +../linux-2.6.17-gentoo-r8/drivers/fc4/fc.c: fc->posmap->list[j] = p->alpa[i++]; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: complete(&adap->dev_released); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: complete(&adap->class_dev_released); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: return sprintf(buf, "%s\n", adap->name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->nr = id & MAX_ID_MASK; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_init(&adap->bus_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_init(&adap->clist_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: list_add_tail(&adap->list,&adapters); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: INIT_LIST_HEAD(&adap->clients); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: if (adap->dev.parent == NULL) +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->dev.parent = &platform_bus; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: sprintf(adap->dev.bus_id, "i2c-%d", adap->nr); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->dev.driver = &i2c_adapter_driver; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->dev.release = &i2c_adapter_dev_release; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: device_register(&adap->dev); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: device_create_file(&adap->dev, &dev_attr_name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: memset(&adap->class_dev, 0x00, sizeof(struct class_device)); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->class_dev.dev = &adap->dev; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->class_dev.class = &i2c_adapter_class; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: strlcpy(adap->class_dev.class_id, adap->dev.bus_id, BUS_ID_SIZE); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: class_device_register(&adap->class_dev); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_dbg(&adap->dev, "adapter [%s] registered\n", adap->name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: "adapter [%s]\n", adap->name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_err(&adap->dev, "detach_adapter failed " +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: list_for_each_safe(item, _n, &adap->clients) { +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_err(&adap->dev, "detach_client failed for client " +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: init_completion(&adap->dev_released); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: init_completion(&adap->class_dev_released); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: class_device_unregister(&adap->class_dev); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: device_remove_file(&adap->dev, &dev_attr_name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: device_unregister(&adap->dev); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: list_del(&adap->list); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: wait_for_completion(&adap->dev_released); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: wait_for_completion(&adap->class_dev_released); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: idr_remove(&i2c_adapter_idr, adap->nr); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_dbg(&adap->dev, "adapter [%s] unregistered\n", adap->name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_err(&adap->dev, "detach_adapter failed " +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: list_for_each_safe(item2, _n, &adap->clients) { +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_dbg(&adap->dev, "detaching client [%s] " +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_err(&adap->dev, "detach_client " +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_lock(&adap->clist_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: list_for_each(item,&adap->clients) { +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_unlock(&adap->clist_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_lock(&adap->clist_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_unlock(&adap->clist_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: if (adap->algo->master_xfer) { +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_dbg(&adap->dev, "master_xfer[%d] %c, addr=0x%02x, " +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_lock(&adap->bus_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: ret = adap->algo->master_xfer(adap,msgs,num); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: mutex_unlock(&adap->bus_lock); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: dev_dbg(&adap->dev, "I2C level transfers not supported\n"); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->retries = arg; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: adap->timeout = arg; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: if (adap->algo->algo_control!=NULL) +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: ret = adap->algo->algo_control(adap,cmd,arg); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-core.c: module_put(adap->owner); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: if ((i2c_dev_array[adap->nr]) && +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: (i2c_dev_array[adap->nr]->adap == adap)) +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: i2c_dev = i2c_dev_array[adap->nr]; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: if (i2c_dev_array[adap->nr]) { +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: dev_err(&adap->dev, "i2c-dev already has a device assigned to this adapter\n"); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: i2c_dev->minor = adap->nr; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: i2c_dev_array[adap->nr] = i2c_dev; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: return sprintf(buf, "%s\n", i2c_dev->adap->name); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: adap = i2c_get_adapter(i2c_dev->adap->nr); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: adap->name, i2c_dev->minor); +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: if (adap->dev.parent == &platform_bus) +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: dev = &adap->dev; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: dev = adap->dev.parent; +../linux-2.6.17-gentoo-r8/drivers/i2c/i2c-dev.c: pr_debug("i2c-dev: adapter [%s] unregistered\n", adap->name); +../linux-2.6.17-gentoo-r8/drivers/ide/ide-cd.c: size -= sizeof(cap->pad); +../linux-2.6.17-gentoo-r8/drivers/ide/ide-cd.c: (((unsigned int)cap->curspeed) + (176/2)) / 176; +../linux-2.6.17-gentoo-r8/drivers/ide/ide-cd.c: (((unsigned int)cap->maxspeed) + (176/2)) / 176; +../linux-2.6.17-gentoo-r8/drivers/ide/ide-cd.c: (ntohs(cap->curspeed) + (176/2)) / 176; +../linux-2.6.17-gentoo-r8/drivers/ide/ide-cd.c: (ntohs(cap->maxspeed) + (176/2)) / 176; +../linux-2.6.17-gentoo-r8/drivers/ieee1394/iso.c: /* check for wrap-around */ +../linux-2.6.17-gentoo-r8/drivers/ieee1394/ohci1394.c: /* check for wrap-around */ +../linux-2.6.17-gentoo-r8/drivers/ieee1394/ohci1394.c: /* check for wrap-around */ +../linux-2.6.17-gentoo-r8/drivers/ieee1394/ohci1394.c: /* check for wrap-around */ +../linux-2.6.17-gentoo-r8/drivers/ieee1394/oui.db:000DE7 Snap-on OEM Group +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: return bitmap->mddev ? mdname(bitmap->mddev) : "mdX"; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: res = bitmap->flags & BITMAP_ACTIVE; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (page >= bitmap->pages) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bmname(bitmap), page, bitmap->pages-1); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->bp[page].hijacked) /* it's hijacked, don't try to alloc */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->bp[page].map) /* page is already allocated, just return */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->bp[page].map) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp[page].hijacked = 1; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->bp[page].map || bitmap->bp[page].hijacked) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp[page].map = mappage; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->missing_pages--; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->bp[page].count) /* page is still busy */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->bp[page].hijacked) { /* page was hijacked, undo this now */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp[page].hijacked = 0; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp[page].map = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: ptr = bitmap->bp[page].map; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp[page].map = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->missing_pages++; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->file == NULL) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: return write_sb_page(bitmap->mddev, bitmap->offset, page, wait); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: ret = page->mapping->a_ops->prepare_write(bitmap->file, page, 0, PAGE_SIZE); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: ret = page->mapping->a_ops->commit_write(bitmap->file, page, 0, +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: struct page_list *item = mempool_alloc(bitmap->write_pool, GFP_NOIO); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: list_add(&item->list, &bitmap->complete_pages); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: md_wakeup_thread(bitmap->writeback_daemon); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap || !bitmap->mddev) /* no bitmap for this array */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->sb_page) { /* no superblock */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb->events = cpu_to_le64(bitmap->mddev->events); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->mddev->degraded) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb->events_cleared = cpu_to_le64(bitmap->mddev->events); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: return write_page(bitmap, bitmap->sb_page, 1); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap || !bitmap->sb_page) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->file) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->sb_page = read_page(bitmap->file, 0, &bytes_read); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->sb_page = read_sb_page(bitmap->mddev, bitmap->offset, 0); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (IS_ERR(bitmap->sb_page)) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: err = PTR_ERR(bitmap->sb_page); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->sb_page = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: /* verify that the bitmap-specific fields are valid */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb->sync_size = cpu_to_le64(bitmap->mddev->resync_max_sectors); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->mddev->persistent) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (memcmp(sb->uuid, bitmap->mddev->uuid, 16)) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (events < bitmap->mddev->events) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: (unsigned long long) bitmap->mddev->events); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->chunksize = chunksize; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->daemon_sleep = daemon_sleep; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->daemon_lastrun = jiffies; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->max_write_behind = write_behind; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->flags |= sb->state; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->flags |= BITMAP_HOSTENDIAN; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->events_cleared = le64_to_cpu(sb->events_cleared); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->events_cleared = bitmap->mddev->events; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->sb_page) { /* can't set the state */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: get_page(bitmap->sb_page); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb = (bitmap_super_t *)kmap_atomic(bitmap->sb_page, KM_USER0); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: put_page(bitmap->sb_page); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: return bitmap->filemap[file_page_index(chunk) - file_page_index(0)]; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: map = bitmap->filemap; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: attr = bitmap->filemap_attr; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap_attr = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: pages = bitmap->file_pages; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->file_pages = 0; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sb_page = bitmap->sb_page; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->sb_page = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: struct list_head *head = &bitmap->complete_pages; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: mempool_free(item, bitmap->write_pool); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: wake_up(&bitmap->write_wait); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: file = bitmap->file; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->file = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->file) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: ptr = file_path(bitmap->file, path, PAGE_SIZE); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap_attr[page->index] |= attr; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap_attr[page->index] &= ~attr; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: return bitmap->filemap_attr[page->index]; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->filemap) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->flags & BITMAP_HOSTENDIAN) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: for (i = 0; i < bitmap->file_pages; i++) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->filemap) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: page = bitmap->filemap[i]; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->file) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irq(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: wait_event_lock_irq(bitmap->write_wait, +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: list_empty(&bitmap->complete_pages), bitmap->write_lock, +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: wake_up_process(bitmap->writeback_daemon->tsk)); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: md_super_wait(bitmap->mddev); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: chunks = bitmap->chunks; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: file = bitmap->file; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: BUG_ON(!file && !bitmap->offset); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: outofdate = bitmap->flags & BITMAP_STALE; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap = kmalloc(sizeof(struct page *) * num_pages, GFP_KERNEL); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->filemap) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap_attr = kzalloc(sizeof(long) * num_pages, GFP_KERNEL); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->filemap_attr) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: page = bitmap->sb_page; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: page = read_sb_page(bitmap->mddev, bitmap->offset, index); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap[bitmap->file_pages++] = page; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->flags & BITMAP_HOSTENDIAN) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: set_bit(MD_RECOVERY_NEEDED, &bitmap->mddev->recovery); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: md_wakeup_thread(bitmap->mddev->thread); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bmname(bitmap), bitmap->file_pages, num_pages, bit_cnt, ret); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: unsigned long chunks = bitmap->chunks; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->filemap_attr[num_pages] |= BITMAP_PAGE_NEEDWRITE; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp[page].count += inc; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: (unsigned long long)offset, inc, bitmap->bp[page].count); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (time_before(jiffies, bitmap->daemon_lastrun + bitmap->daemon_sleep*HZ)) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->daemon_lastrun = jiffies; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: for (j = 0; j < bitmap->chunks; j++) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->filemap) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->flags & BITMAP_HOSTENDIAN) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: mempool_free(item, bitmap->write_pool); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: wake_up(&bitmap->write_wait); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: daemon_exit(bitmap, &bitmap->writeback_daemon); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: daemon = md_register_thread(func, bitmap->mddev, namebuf); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->writeback_daemon && ! IS_ERR(bitmap->writeback_daemon) && +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: current->pid != bitmap->writeback_daemon->tsk->pid) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: daemon = bitmap->writeback_daemon; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->writeback_daemon = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (bitmap->bp[page].hijacked) { /* hijacked pointer */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: &bitmap->bp[page].map)[hi]; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: &(bitmap->bp[page].map[pageoff]); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: atomic_inc(&bitmap->behind_writes); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: atomic_read(&bitmap->behind_writes), bitmap->max_write_behind); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: blk_plug_device(bitmap->mddev->queue); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: atomic_dec(&bitmap->behind_writes); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: atomic_read(&bitmap->behind_writes), bitmap->max_write_behind); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: while (sector < bitmap->mddev->resync_max_sectors) { +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_unlock_irq(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sleep = bitmap->daemon_sleep; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->daemon_sleep = 0; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->daemon_sleep = sleep; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bp = bitmap->bp; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: pages = bitmap->pages; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: mempool_destroy(bitmap->write_pool); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_init(&bitmap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->mddev = mddev; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: spin_lock_init(&bitmap->write_lock); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: INIT_LIST_HEAD(&bitmap->complete_pages); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: init_waitqueue_head(&bitmap->write_wait); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->write_pool = mempool_create_kmalloc_pool(WRITE_POOL_SIZE, +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->write_pool) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->file = file; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->offset = mddev->bitmap_offset; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: /* read superblock from bitmap file (this sets bitmap->chunksize) */ +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->chunkshift = find_first_bit(&bitmap->chunksize, +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: sizeof(bitmap->chunksize)); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->chunks = chunks; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->pages = pages; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->missing_pages = pages; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->counter_bits = COUNTER_BITS; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->syncchunk = ~0UL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp = NULL; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->bp = kzalloc(pages * sizeof(*bitmap->bp), GFP_KERNEL); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (!bitmap->bp) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->flags |= BITMAP_ACTIVE; +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: || bitmap->events_cleared == mddev->events) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: bitmap->writeback_daemon = +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: if (IS_ERR(bitmap->writeback_daemon)) +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: return PTR_ERR(bitmap->writeback_daemon); +../linux-2.6.17-gentoo-r8/drivers/md/bitmap.c: mddev->thread->timeout = bitmap->daemon_sleep * HZ; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: len = ps->snap->chunk_size << SECTOR_SHIFT; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: where.bdev = ps->snap->cow->bdev; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: where.sector = ps->snap->chunk_size * chunk; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: where.count = ps->snap->chunk_size; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: memset(ps->area, 0, ps->snap->chunk_size << SECTOR_SHIFT); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: if (ps->snap->chunk_size != chunk_size) { +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: (unsigned long long)ps->snap->chunk_size); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: dm_io_put(sectors_to_pages(ps->snap->chunk_size)); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: ps->snap->chunk_size = chunk_size; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: ps->snap->chunk_mask = chunk_size - 1; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: ps->snap->chunk_shift = ffs(chunk_size) - 1; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: memset(ps->area, 0, ps->snap->chunk_size << SECTOR_SHIFT); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: dh->chunk_size = cpu_to_le32(ps->snap->chunk_size); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: *numerator = get_info(store)->next_free * store->snap->chunk_size; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: *denominator = get_dev_size(store->snap->cow->bdev); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: dm_io_put(sectors_to_pages(ps->snap->chunk_size)); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: ps->exceptions_per_area = (ps->snap->chunk_size << SECTOR_SHIFT) / +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: sector_t size = get_dev_size(store->snap->cow->bdev); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: if (size < ((ps->next_free + 1) * store->snap->chunk_size)) +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: sector_t size = get_dev_size(store->snap->cow->bdev); +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: if (size < (tc->next_free + store->snap->chunk_size)) +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: tc->next_free += store->snap->chunk_size; +../linux-2.6.17-gentoo-r8/drivers/md/dm-exception-store.c: *denominator = get_dev_size(store->snap->cow->bdev); +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: * If incrementing or decrementing this, hold pe->snap->lock for +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: * the sibling concerned and not pe->primary_pe->snap->lock unless +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: struct block_device *bdev = snap->origin->bdev; +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: list_add_tail(&snap->list, &o->snapshots); +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: * NOTE: a write lock must be held on snap->lock before calling +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: /* this is protected by snap->lock */ +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: if (!snap->valid) +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: if (snap->store.fraction_full) { +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: snap->store.fraction_full(&snap->store, +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: snap->origin->name, snap->cow->name, +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: snap->type, +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: (unsigned long long)snap->chunk_size); +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: down_write(&snap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: if (!snap->valid || !snap->active) +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: if (bio->bi_sector >= dm_table_get_size(snap->table)) +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: e = lookup_exception(&snap->complete, chunk); +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: up_write(&snap->lock); +../linux-2.6.17-gentoo-r8/drivers/md/dm-snap.c: chunk_size = min_not_zero(chunk_size, snap->chunk_size); +../linux-2.6.17-gentoo-r8/drivers/md/md.c: if (ev1 < mddev->bitmap->events_cleared) +../linux-2.6.17-gentoo-r8/drivers/md/md.c: if (ev1 < mddev->bitmap->events_cleared) +../linux-2.6.17-gentoo-r8/drivers/md/md.c: if (!mddev->bitmap || !mddev->bitmap->file) { +../linux-2.6.17-gentoo-r8/drivers/md/md.c: ptr = file_path(mddev->bitmap->file, buf, sizeof(file->pathname)); +../linux-2.6.17-gentoo-r8/drivers/md/md.c: if (mddev->bitmap->file) +../linux-2.6.17-gentoo-r8/drivers/md/md.c: spin_lock_irqsave(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/md.c: chunk_kb = bitmap->chunksize >> 10; +../linux-2.6.17-gentoo-r8/drivers/md/md.c: bitmap->pages - bitmap->missing_pages, +../linux-2.6.17-gentoo-r8/drivers/md/md.c: bitmap->pages, +../linux-2.6.17-gentoo-r8/drivers/md/md.c: (bitmap->pages - bitmap->missing_pages) +../linux-2.6.17-gentoo-r8/drivers/md/md.c: chunk_kb ? chunk_kb : bitmap->chunksize, +../linux-2.6.17-gentoo-r8/drivers/md/md.c: if (bitmap->file) { +../linux-2.6.17-gentoo-r8/drivers/md/md.c: seq_path(seq, bitmap->file->f_vfsmnt, +../linux-2.6.17-gentoo-r8/drivers/md/md.c: bitmap->file->f_dentry," \t\n"); +../linux-2.6.17-gentoo-r8/drivers/md/md.c: spin_unlock_irqrestore(&bitmap->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/md/md.c: if (spares && mddev->bitmap && ! mddev->bitmap->file) { +../linux-2.6.17-gentoo-r8/drivers/md/raid1.c: atomic_read(&bitmap->behind_writes) < bitmap->max_write_behind && +../linux-2.6.17-gentoo-r8/drivers/md/raid1.c: while (bitmap && atomic_read(&bitmap->behind_writes) > 0) { +../linux-2.6.17-gentoo-r8/drivers/md/raid10.c: mddev->thread->timeout = mddev->bitmap->daemon_sleep * HZ; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c:#define ACE_IS_TIGON_I(ap) (ap->version == 1) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c:#define ACE_TX_RING_ENTRIES(ap) ap->tx_ring_entries +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pdev = pdev; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name = pci_name(pdev); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_read_config_word(pdev, PCI_COMMAND, &ap->pci_command); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(ap->pci_command & PCI_COMMAND_MEMORY)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command = ap->pci_command | PCI_COMMAND_MEMORY; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_write_config_word(ap->pdev, PCI_COMMAND, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_read_config_byte(pdev, PCI_LATENCY_TIMER, &ap->pci_latency); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->pci_latency <= 0x40) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_latency = 0x40; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_write_config_byte(pdev, PCI_LATENCY_TIMER, ap->pci_latency); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->regs = ioremap(dev->base_addr, 0x4000); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!ap->regs) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name, boards_found); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: printk(KERN_INFO "%s: 3Com 3C985 ", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: printk(KERN_INFO "%s: NetGear GA620 ", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: printk(KERN_INFO "%s: SGI AceNIC ", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: printk(KERN_INFO "%s: Unknown AceNIC ", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if ((readl(&ap->regs->HostCtrl) >> 28) == 4) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->board_idx = BOARD_IDX_OVERFLOW; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->board_idx = boards_found; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->board_idx = BOARD_IDX_STATIC; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name = dev->name; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->pci_using_dac) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct sk_buff *skb = ap->skb->rx_std_skbuff[i].skb; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ringp = &ap->skb->rx_std_skbuff[i]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_page(ap->pdev, mapping, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_std_ring[i].size = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_std_skbuff[i].skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct sk_buff *skb = ap->skb->rx_mini_skbuff[i].skb; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ringp = &ap->skb->rx_mini_skbuff[i]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_page(ap->pdev, mapping, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_mini_ring[i].size = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_mini_skbuff[i].skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct sk_buff *skb = ap->skb->rx_jumbo_skbuff[i].skb; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ringp = &ap->skb->rx_jumbo_skbuff[i]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_page(ap->pdev, mapping, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_ring[i].size = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_jumbo_skbuff[i].skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->rx_std_ring != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, size, ap->rx_std_ring, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_ring_base_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_std_ring = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_ring = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_mini_ring = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_return_ring = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->evt_ring != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, size, ap->evt_ring, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->evt_ring_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->evt_ring = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->tx_ring != NULL && !ACE_IS_TIGON_I(ap)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, size, ap->tx_ring, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ring_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ring = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->evt_prd != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, sizeof(u32), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (void *)ap->evt_prd, ap->evt_prd_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->evt_prd = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->rx_ret_prd != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, sizeof(u32), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (void *)ap->rx_ret_prd, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_ret_prd_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_ret_prd = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->tx_csm != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, sizeof(u32), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (void *)ap->tx_csm, ap->tx_csm_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_csm = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_std_ring = pci_alloc_consistent(ap->pdev, size, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->rx_ring_base_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->rx_std_ring == NULL) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_ring = ap->rx_std_ring + RX_STD_RING_ENTRIES; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_mini_ring = ap->rx_jumbo_ring + RX_JUMBO_RING_ENTRIES; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_return_ring = ap->rx_mini_ring + RX_MINI_RING_ENTRIES; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->evt_ring = pci_alloc_consistent(ap->pdev, size, &ap->evt_ring_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->evt_ring == NULL) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ring = pci_alloc_consistent(ap->pdev, size, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->tx_ring_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->tx_ring == NULL) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->evt_prd = pci_alloc_consistent(ap->pdev, sizeof(u32), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->evt_prd_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->evt_prd == NULL) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_ret_prd = pci_alloc_consistent(ap->pdev, sizeof(u32), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->rx_ret_prd_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->rx_ret_prd == NULL) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_csm = pci_alloc_consistent(ap->pdev, sizeof(u32), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->tx_csm_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->tx_csm == NULL) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->info) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_free_consistent(ap->pdev, sizeof(struct ace_info), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->info, ap->info_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: kfree(ap->skb); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: kfree(ap->trace_buf); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: iounmap(ap->regs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: board_idx = ap->board_idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->version = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ring_entries = TIGON_I_TX_RING_ENTRIES; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->version = 2; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ring_entries = MAX_TX_RING_ENTRIES; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pdev = ap->pdev; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_latency); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->pci_command & PCI_COMMAND_INVALIDATE) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command &= ~PCI_COMMAND_INVALIDATE; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: } else if (ap->pci_command & PCI_COMMAND_INVALIDATE) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command &= ~PCI_COMMAND_INVALIDATE; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(ap->pci_command & PCI_COMMAND_FAST_BACK)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_command |= PCI_COMMAND_FAST_BACK; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_write_config_word(pdev, PCI_COMMAND, ap->pci_command); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_using_dac = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->pci_using_dac = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(info = pci_alloc_consistent(ap->pdev, sizeof(struct ace_info), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->info_dma))) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->info = info; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(ap->skb = kmalloc(sizeof(struct ace_skb), GFP_KERNEL))) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: spin_lock_init(&ap->debug_lock); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->last_tx = ACE_TX_RING_ENTRIES(ap) - 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->last_std_rx = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->last_mini_rx = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->info, 0, sizeof(struct ace_info)); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->skb, 0, sizeof(struct ace_skb)); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->fw_running = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: tmp_ptr = ap->info_dma; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->evt_ring, 0, EVT_RING_ENTRIES * sizeof(struct event)); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&info->evt_ctrl.rngptr, ap->evt_ring_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: *(ap->evt_prd) = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&info->evt_prd_ptr, ap->evt_prd_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: tmp_ptr = ap->info_dma; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&info->rx_std_ctrl.rngptr, ap->rx_ring_base_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->rx_std_ring, 0, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_std_ring[i].flags = BD_FLG_TCP_UDP_SUM; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_std_skbprd = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_set(&ap->cur_rx_bufs, 0); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (ap->rx_ring_base_dma + +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->rx_jumbo_ring, 0, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_ring[i].flags = BD_FLG_TCP_UDP_SUM | BD_FLG_JUMBO; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_skbprd = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_set(&ap->cur_jumbo_bufs, 0); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->rx_mini_ring, 0, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (ap->rx_ring_base_dma + +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_mini_ring[i].flags = +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_mini_skbprd = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_set(&ap->cur_mini_bufs, 0); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (ap->rx_ring_base_dma + +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->rx_return_ring, 0, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&info->rx_ret_prd_ptr, ap->rx_ret_prd_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: *(ap->rx_ret_prd) = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ring = (struct tx_desc *) regs->Window; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: writel(0, (void __iomem *)ap->tx_ring + i * 4); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->tx_ring, 0, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&info->tx_ctrl.rngptr, ap->tx_ring_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&info->tx_csm_ptr, ap->tx_csm_dma); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name, ACE_MAX_MOD_PARMS); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if(ap->version >= 2) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "forcing auto negotiation\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "negotiation\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if ((option & 0x400) && (ap->version >= 2)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->link = tmp; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version == 2) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->cur_rx = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_prd = *(ap->tx_csm) = ap->tx_ret_csm = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(&ap->stats, 0, sizeof(ap->stats)); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: while (time_before(jiffies, myjif) && !ap->fw_running) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!ap->fw_running) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: printk(KERN_ERR "%s: Firmware NOT running!\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!test_and_set_bit(0, &ap->std_refill_busy)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!test_and_set_bit(0, &ap->mini_refill_busy)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "the RX mini ring\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: int board_idx = ap->board_idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (*ap->tx_csm != ap->tx_ret_csm) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cur_size = atomic_read(&ap->cur_rx_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: !test_and_set_bit(0, &ap->std_refill_busy)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->version >= 2) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cur_size = atomic_read(&ap->cur_mini_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: !test_and_set_bit(0, &ap->mini_refill_busy)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cur_size = atomic_read(&ap->cur_jumbo_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->jumbo && (cur_size < RX_LOW_JUMBO_THRES) && +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: !test_and_set_bit(0, &ap->jumbo_refill_busy)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tasklet_pending = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!ap->trace_buf) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(ap->trace_buf = kmalloc(ACE_TRACE_SIZE, GFP_KERNEL))) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: prefetchw(&ap->cur_rx_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: idx = ap->rx_std_skbprd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: mapping = pci_map_page(ap->pdev, virt_to_page(skb->data), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_std_skbuff[idx].skb = skb; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_addr_set(&ap->skb->rx_std_skbuff[idx], +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rd = &ap->rx_std_ring[idx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_add(i, &ap->cur_rx_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_std_skbprd = idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cmd.idx = ap->rx_std_skbprd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: clear_bit(0, &ap->std_refill_busy); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: prefetchw(&ap->cur_mini_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: idx = ap->rx_mini_skbprd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: mapping = pci_map_page(ap->pdev, virt_to_page(skb->data), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_mini_skbuff[idx].skb = skb; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_addr_set(&ap->skb->rx_mini_skbuff[idx], +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rd = &ap->rx_mini_ring[idx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_add(i, &ap->cur_mini_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_mini_skbprd = idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: clear_bit(0, &ap->mini_refill_busy); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: idx = ap->rx_jumbo_skbprd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: mapping = pci_map_page(ap->pdev, virt_to_page(skb->data), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_jumbo_skbuff[idx].skb = skb; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_addr_set(&ap->skb->rx_jumbo_skbuff[idx], +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rd = &ap->rx_jumbo_ring[idx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_add(i, &ap->cur_jumbo_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_skbprd = idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cmd.idx = ap->rx_jumbo_skbprd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: clear_bit(0, &ap->jumbo_refill_busy); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: switch (ap->evt_ring[evtcsm].evt) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->fw_running = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: u16 code = ap->evt_ring[evtcsm].code; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: u32 state = readl(&ap->regs->GigLnkState); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "UP\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "state %02x\n", ap->name, code); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: switch(ap->evt_ring[evtcsm].code) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "error\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name, ap->evt_ring[evtcsm].code); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->skb->rx_jumbo_skbuff[i].skb) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_ring[i].size = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: set_aceaddr(&ap->rx_jumbo_ring[i].addr, 0); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: dev_kfree_skb(ap->skb->rx_jumbo_skbuff[i].skb); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->skb->rx_jumbo_skbuff[i].skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ace_issue_cmd(ap->regs, &cmd); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: writel(0, &((ap->regs)->RxJumboPrd)); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->jumbo = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->rx_jumbo_skbprd = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: clear_bit(0, &ap->jumbo_refill_busy); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name, ap->evt_ring[evtcsm].evt); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: prefetchw(&ap->cur_rx_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: prefetchw(&ap->cur_mini_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: retdesc = &ap->rx_return_ring[idx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rip = &ap->skb->rx_std_skbuff[skbidx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rxdesc = &ap->rx_std_ring[skbidx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rip = &ap->skb->rx_jumbo_skbuff[skbidx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rxdesc = &ap->rx_jumbo_ring[skbidx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_dec(&ap->cur_jumbo_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rip = &ap->skb->rx_mini_skbuff[skbidx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rxdesc = &ap->rx_mini_ring[skbidx]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_page(ap->pdev, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->vlgrp && (bd_flags & BD_FLG_VLAN_TAG)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: vlan_hwaccel_rx(skb, ap->vlgrp, retdesc->vlan); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.rx_packets++; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.rx_bytes += retdesc->size; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_sub(std_count, &ap->cur_rx_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: atomic_sub(mini_count, &ap->cur_mini_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: writel(idx, &ap->regs->RxRetCsm); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->cur_rx = idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: info = ap->skb->tx_skbuff + idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_page(ap->pdev, mapping, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.tx_packets++; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.tx_bytes += skb->len; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_ret_csm = txcsm; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: * which happened _after_ rxretprd = *ap->rx_ret_prd; but before +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rxretprd = *ap->rx_ret_prd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: rxretcsm = ap->cur_rx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: txcsm = *ap->tx_csm; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: idx = ap->tx_ret_csm; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!tx_ring_full(ap, txcsm, ap->tx_prd)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: evtprd = *ap->evt_prd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cur_size = atomic_read(&ap->cur_rx_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: !test_and_set_bit(0, &ap->std_refill_busy)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cur_size = atomic_read(&ap->cur_mini_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->mini_refill_busy)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->jumbo) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: cur_size = atomic_read(&ap->cur_jumbo_bufs); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: &ap->jumbo_refill_busy)){ +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (run_tasklet && !ap->tasklet_pending) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tasklet_pending = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: tasklet_schedule(&ap->ace_tasklet); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->vlgrp = grp; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->vlgrp) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->vlgrp->vlan_devices[vid] = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(ap->fw_running)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->jumbo && +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: !test_and_set_bit(0, &ap->jumbo_refill_busy)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->promisc = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->promisc = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->mcast_all = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: tasklet_init(&ap->ace_tasklet, ace_tasklet, (unsigned long)dev); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->promisc) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->promisc = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: tasklet_kill(&ap->ace_tasklet); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: info = ap->skb->tx_skbuff + i; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: = (struct tx_desc __iomem *) &ap->tx_ring[i]; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: memset(ap->tx_ring + i, 0, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: pci_unmap_page(ap->pdev, mapping, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->jumbo) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: mapping = pci_map_page(ap->pdev, virt_to_page(skb->data), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: info = ap->skb->tx_skbuff + idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: idx = ap->tx_prd; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (tx_ring_full(ap, ap->tx_ret_csm, idx)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: desc = ap->tx_ring + idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (tx_ring_full(ap, ap->tx_ret_csm, idx)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ace_load_tx_bd(ap, ap->tx_ring + idx, mapping, flagsize, vlan_tag); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: info = ap->skb->tx_skbuff + idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: desc = ap->tx_ring + idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: mapping = pci_map_page(ap->pdev, frag->page, +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (tx_ring_full(ap, ap->tx_ret_csm, idx)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->tx_prd = idx; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!tx_ring_full(ap, ap->tx_ret_csm, idx)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!(ap->jumbo)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->jumbo = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (!test_and_set_bit(0, &ap->jumbo_refill_busy)) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: while (test_and_set_bit(0, &ap->jumbo_refill_busy)); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->jumbo) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (link != ap->link) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->link = link; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if (ap->pdev) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: strlcpy(info->bus_info, pci_name(ap->pdev), +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if ((dev->flags & IFF_ALLMULTI) && !(ap->mcast_all)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->mcast_all = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: } else if (ap->mcast_all) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->mcast_all = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if ((dev->flags & IFF_PROMISC) && !(ap->promisc)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->promisc = 1; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: }else if (!(dev->flags & IFF_PROMISC) && (ap->promisc)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->promisc = 0; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: if ((dev->mc_count) && !(ap->mcast_all)) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: }else if (!ap->mcast_all) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: (struct ace_mac_stats __iomem *)ap->regs->Stats; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.rx_missed_errors = readl(&mac_stats->drop_space); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.multicast = readl(&mac_stats->kept_mc); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->stats.collisions = readl(&mac_stats->coll); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: return &ap->stats; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: "CPU is running!\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: }else if (ap->version == 2) { +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: printk(KERN_ERR "%s: Unable to sync eeprom\n", ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.c: ap->name, offset); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.h: spin_lock_irqsave(&ap->debug_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.h: if (value == ap->last_tx) +../linux-2.6.17-gentoo-r8/drivers/net/acenic.h: ap->last_tx = value; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.h: spin_unlock_irqrestore(&ap->debug_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/net/acenic.h: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/acenic.h: struct ace_regs __iomem *regs = ap->regs; +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: printk("%s: set_config called: dev->if_port %d map->port %x\n", +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: dev->name, dev->if_port, map->port); +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: switch(map->port){ +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/au1000_eth.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/b44.c: map->skb = skb; +../linux-2.6.17-gentoo-r8/drivers/net/b44.c: src_map->skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/b44.c: dest_map->skb = src_map->skb; +../linux-2.6.17-gentoo-r8/drivers/net/b44.c: rh = (struct rx_header *) src_map->skb->data; +../linux-2.6.17-gentoo-r8/drivers/net/b44.c: src_map->skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/bmac.c: dbdma_st32(&dmap->control, +../linux-2.6.17-gentoo-r8/drivers/net/bmac.c: dbdma_st32(&dmap->control, +../linux-2.6.17-gentoo-r8/drivers/net/bmac.c: while (dbdma_ld32(&dmap->status) & RUN) +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pcpar &= ~0x0001; +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pcdir &= ~0x0001; +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pcso &= ~0x0001; +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pcint |= 0x0001; +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pdpar = 0x1fff; +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pddir = 0x1c58; /* Pre rev. D */ +../linux-2.6.17-gentoo-r8/drivers/net/fec.c: immap->im_ioport.iop_pddir = 0x1fff; /* Rev. D and later */ +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: atomic_inc(&ap->refcnt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (atomic_dec_and_test(&ap->refcnt)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: up(&ap->dead_sem); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tty = tty; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->mru = PPP_MRU; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_lock_init(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_lock_init(&ap->recv_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->xaccm[0] = ~0U; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->xaccm[3] = 0x60000000U; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->raccm = ~0U; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->optr = ap->obuf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->olim = ap->obuf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->lcp_fcs = -1; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb_queue_head_init(&ap->rqueue); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: tasklet_init(&ap->tsk, ppp_async_process, (unsigned long) ap); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: atomic_set(&ap->refcnt, 1); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: init_MUTEX_LOCKED(&ap->dead_sem); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->chan.private = ap; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->chan.ops = &async_ops; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->chan.mtu = PPP_MRU; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: err = ppp_register_channel(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (!atomic_dec_and_test(&ap->refcnt)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: down(&ap->dead_sem); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: tasklet_kill(&ap->tsk); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ppp_unregister_channel(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->rpkt != 0) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: kfree_skb(ap->rpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb_queue_purge(&ap->rqueue); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->tpkt != 0) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (put_user(ppp_channel_index(&ap->chan), p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (put_user(ppp_unit_number(&ap->chan), p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_lock_irqsave(&ap->recv_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_unlock_irqrestore(&ap->recv_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (!skb_queue_empty(&ap->rqueue)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: tasklet_schedule(&ap->tsk); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: set_bit(XMIT_WAKEUP, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: tasklet_schedule(&ap->tsk); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: val = ap->flags | ap->rbits; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->flags = val & ~SC_RCV_BITS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_lock_irq(&ap->recv_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->rbits = val & SC_RCV_BITS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_unlock_irq(&ap->recv_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (put_user(ap->xaccm[0], (u32 __user *)argp)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (get_user(ap->xaccm[0], (u32 __user *)argp)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (put_user(ap->raccm, (u32 __user *)argp)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (get_user(ap->raccm, (u32 __user *)argp)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (copy_to_user(argp, ap->xaccm, sizeof(ap->xaccm))) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: memcpy(ap->xaccm, accm, sizeof(ap->xaccm)); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (put_user(ap->mru, p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->mru = val; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: while ((skb = skb_dequeue(&ap->rqueue)) != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ppp_input_error(&ap->chan, 0); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ppp_input(&ap->chan, skb); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (test_bit(XMIT_WAKEUP, &ap->xmit_flags) && ppp_async_push(ap)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ppp_output_wakeup(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: * Assumes ap->tpkt != 0 on entry. +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if ((islcp && c < 0x20) || (ap->xaccm[c >> 5] & (1 << (c & 0x1f)))) {\ +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: buf = ap->obuf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->olim = buf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->optr = buf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: i = ap->tpkt_pos; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: data = ap->tpkt->data; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: count = ap->tpkt->len; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: fcs = ap->tfcs; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: || time_after_eq(jiffies, ap->last_xmit + flag_time)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->last_xmit = jiffies; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if ((ap->flags & SC_COMP_AC) == 0 || islcp) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: buflim = ap->obuf + OBUFSIZE - 6; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (i == 1 && c == 0 && (ap->flags & SC_COMP_PROT)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->olim = buf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tpkt_pos = i; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tfcs = fcs; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->olim = buf; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (test_and_set_bit(XMIT_FULL, &ap->xmit_flags)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tpkt = skb; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tpkt_pos = 0; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: struct tty_struct *tty = ap->tty; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (test_and_set_bit(XMIT_BUSY, &ap->xmit_flags)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_lock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (test_and_clear_bit(XMIT_WAKEUP, &ap->xmit_flags)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (!tty_stuffed && ap->optr < ap->olim) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: avail = ap->olim - ap->optr; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: sent = tty->driver->write(tty, ap->optr, avail); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->optr += sent; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->optr >= ap->olim && ap->tpkt != 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: /* finished processing ap->tpkt */ +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: clear_bit(XMIT_BUSY, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (!(test_bit(XMIT_WAKEUP, &ap->xmit_flags) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: || (!tty_stuffed && ap->tpkt != 0))) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (test_and_set_bit(XMIT_BUSY, &ap->xmit_flags)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_unlock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: clear_bit(XMIT_BUSY, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->tpkt != 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->optr = ap->olim; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_unlock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_lock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->optr = ap->olim; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->tpkt != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->tpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: spin_unlock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ppp_output_wakeup(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: || (c < 0x20 && (ap->raccm & (1 << c)) != 0)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb = ap->rpkt; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->state & (SC_TOSS | SC_ESCAPE)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb->cb[0] = ap->state; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb_queue_tail(&ap->rqueue, skb); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->rpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state = 0; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state = SC_PREV_ERROR; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (~ap->rbits & SC_RCV_BITS) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->rbits |= s; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if ((ap->state & SC_ESCAPE) && buf[0] == PPP_ESCAPE) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (flags != 0 && (ap->state & SC_TOSS) == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state |= SC_TOSS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: } else if (n > 0 && (ap->state & SC_TOSS) == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb = ap->rpkt; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->rpkt = skb; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state |= SC_TOSS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (ap->state & SC_ESCAPE) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state &= ~SC_ESCAPE; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state |= SC_TOSS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state |= SC_ESCAPE; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: } else if (I_IXON(ap->tty)) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: if (c == START_CHAR(ap->tty)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: start_tty(ap->tty); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: else if (c == STOP_CHAR(ap->tty)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: stop_tty(ap->tty); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->state |= SC_TOSS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->lcp_fcs = fcs; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: fcs ^= ap->lcp_fcs; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->lcp_fcs = -1; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->mru = val; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->chan.mtu = val; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->raccm = val; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_async.c: ap->xaccm[0] = val; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: atomic_inc(&ap->refcnt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (atomic_dec_and_test(&ap->refcnt)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: up(&ap->dead_sem); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->tty = tty; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->mru = PPP_MRU; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_lock_init(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_lock_init(&ap->recv_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->xaccm[0] = ~0U; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->xaccm[3] = 0x60000000U; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->raccm = ~0U; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: skb_queue_head_init(&ap->rqueue); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: tasklet_init(&ap->tsk, ppp_sync_process, (unsigned long) ap); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: atomic_set(&ap->refcnt, 1); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: init_MUTEX_LOCKED(&ap->dead_sem); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->chan.private = ap; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->chan.ops = &sync_ops; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->chan.mtu = PPP_MRU; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->chan.hdrlen = 2; /* for A/C bytes */ +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: err = ppp_register_channel(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (!atomic_dec_and_test(&ap->refcnt)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: down(&ap->dead_sem); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: tasklet_kill(&ap->tsk); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ppp_unregister_channel(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: skb_queue_purge(&ap->rqueue); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (ap->tpkt != 0) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (put_user(ppp_channel_index(&ap->chan), p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (put_user(ppp_unit_number(&ap->chan), p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_lock_irqsave(&ap->recv_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_unlock_irqrestore(&ap->recv_lock, flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (!skb_queue_empty(&ap->rqueue)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: tasklet_schedule(&ap->tsk); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: set_bit(XMIT_WAKEUP, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: tasklet_schedule(&ap->tsk); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: val = ap->flags | ap->rbits; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->flags = val & ~SC_RCV_BITS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_lock_irq(&ap->recv_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->rbits = val & SC_RCV_BITS; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_unlock_irq(&ap->recv_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (put_user(ap->xaccm[0], p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (get_user(ap->xaccm[0], p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (put_user(ap->raccm, p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (get_user(ap->raccm, p)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (copy_to_user(argp, ap->xaccm, sizeof(ap->xaccm))) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: memcpy(ap->xaccm, accm, sizeof(ap->xaccm)); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (put_user(ap->mru, (int __user *) argp)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->mru = val; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: while ((skb = skb_dequeue(&ap->rqueue)) != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ppp_input_error(&ap->chan, 0); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ppp_input(&ap->chan, skb); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (test_bit(XMIT_WAKEUP, &ap->xmit_flags) && ppp_sync_push(ap)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ppp_output_wakeup(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (data[0] == 0 && (ap->flags & SC_COMP_PROT) && !islcp) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if ((ap->flags & SC_COMP_AC) == 0 || islcp) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->last_xmit = jiffies; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (skb && ap->flags & SC_LOG_OUTPKT) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (test_and_set_bit(XMIT_FULL, &ap->xmit_flags)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->tpkt = skb; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: struct tty_struct *tty = ap->tty; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (!spin_trylock_bh(&ap->xmit_lock)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (test_and_clear_bit(XMIT_WAKEUP, &ap->xmit_flags)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (!tty_stuffed && ap->tpkt != 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: sent = tty->driver->write(tty, ap->tpkt->data, ap->tpkt->len); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (sent < ap->tpkt->len) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->tpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_unlock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (!(test_bit(XMIT_WAKEUP, &ap->xmit_flags) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: || (!tty_stuffed && ap->tpkt != 0))) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (!spin_trylock_bh(&ap->xmit_lock)) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (ap->tpkt != 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->tpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_unlock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_lock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (ap->tpkt != NULL) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: kfree_skb(ap->tpkt); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ap->tpkt = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: clear_bit(XMIT_FULL, &ap->xmit_flags); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: spin_unlock_bh(&ap->xmit_lock); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: ppp_output_wakeup(&ap->chan); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if (ap->flags & SC_LOG_INPKT) +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: if ((skb = dev_alloc_skb(ap->mru + PPP_HDRLEN + 2)) == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: skb_queue_tail(&ap->rqueue, skb); +../linux-2.6.17-gentoo-r8/drivers/net/ppp_synctty.c: skb_queue_tail(&ap->rqueue, skb); +../linux-2.6.17-gentoo-r8/drivers/net/sis900.c: if ((map->port != (u_char)(-1)) && (map->port != dev->if_port)) { +../linux-2.6.17-gentoo-r8/drivers/net/sis900.c: /* we switch on the ifmap->port field. I couldn't find anything +../linux-2.6.17-gentoo-r8/drivers/net/sis900.c: switch(map->port){ +../linux-2.6.17-gentoo-r8/drivers/net/sis900.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/sis900.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/sis900.c: dev->if_port = map->port; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->state == ANEG_STATE_UNKNOWN) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->rxconfig = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->link_time = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->cur_time = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_cfg = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_count = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->idle_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ack_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->cur_time++; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (rx_cfg_reg != ap->ability_match_cfg) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_cfg = rx_cfg_reg; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_count = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (++ap->ability_match_count > 1) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match = 1; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_cfg = rx_cfg_reg; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ack_match = 1; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ack_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->idle_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->idle_match = 1; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_cfg = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_count = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ack_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->rxconfig = rx_cfg_reg; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: switch(ap->state) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->flags & (MR_AN_ENABLE | MR_RESTART_AN)) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_AN_ENABLE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags &= ~(MR_AN_COMPLETE | MR_PAGE_RX); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->flags & MR_AN_ENABLE) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->link_time = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->cur_time = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_cfg = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match_count = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ability_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->idle_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->ack_match = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_RESTART_INIT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_DISABLE_LINK_OK; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->link_time = ap->cur_time; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags &= ~(MR_NP_LOADED); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->txconfig = 0; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_RESTART; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: delta = ap->cur_time - ap->link_time; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_ABILITY_DETECT_INIT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags &= ~(MR_TOGGLE_TX); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->txconfig = (ANEG_CFG_FD | ANEG_CFG_PS1); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: tw32(MAC_TX_AUTO_NEG, ap->txconfig); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_ABILITY_DETECT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->ability_match != 0 && ap->rxconfig != 0) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_ACK_DETECT_INIT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->txconfig |= ANEG_CFG_ACK; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: tw32(MAC_TX_AUTO_NEG, ap->txconfig); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_ACK_DETECT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->ack_match != 0) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if ((ap->rxconfig & ~ANEG_CFG_ACK) == +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: (ap->ability_match_cfg & ~ANEG_CFG_ACK)) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_COMPLETE_ACK_INIT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_AN_ENABLE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: } else if (ap->ability_match != 0 && +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->rxconfig == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_AN_ENABLE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_INVAL) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags &= ~(MR_LP_ADV_FULL_DUPLEX | +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_FD) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_FULL_DUPLEX; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_HD) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_HALF_DUPLEX; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_PS1) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_SYM_PAUSE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_PS2) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_ASYM_PAUSE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_RF1) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_REMOTE_FAULT1; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_RF2) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_REMOTE_FAULT2; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_NP) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_LP_ADV_NEXT_PAGE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->link_time = ap->cur_time; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags ^= (MR_TOGGLE_TX); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & 0x0008) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_TOGGLE_RX; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->rxconfig & ANEG_CFG_NP) +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_NP_RX; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= MR_PAGE_RX; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_COMPLETE_ACK; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->ability_match != 0 && +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->rxconfig == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_AN_ENABLE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: delta = ap->cur_time - ap->link_time; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (!(ap->flags & (MR_LP_ADV_NEXT_PAGE))) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_IDLE_DETECT_INIT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if ((ap->txconfig & ANEG_CFG_NP) == 0 && +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: !(ap->flags & MR_NP_RX)) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_IDLE_DETECT_INIT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->link_time = ap->cur_time; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_IDLE_DETECT; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: if (ap->ability_match != 0 && +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->rxconfig == 0) { +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_AN_ENABLE; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: delta = ap->cur_time - ap->link_time; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->state = ANEG_STATE_LINK_OK; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: ap->flags |= (MR_AN_COMPLETE | MR_LINK_OK); +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: map->skb = skb; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: src_map->skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: dest_map->skb = src_map->skb; +../linux-2.6.17-gentoo-r8/drivers/net/tg3.c: src_map->skb = NULL; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/at91_cf.c: if (map->card_start) +../linux-2.6.17-gentoo-r8/drivers/pcmcia/at91_cf.c: map->flags &= MAP_ACTIVE|MAP_ATTRIB|MAP_16BIT; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/at91_cf.c: if (map->flags & MAP_ATTRIB) +../linux-2.6.17-gentoo-r8/drivers/pcmcia/at91_cf.c: map->static_start = CF_ATTR_PHYS; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/at91_cf.c: map->static_start = CF_MEM_PHYS; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: if(map->map>=MAX_IO_WIN){ +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: debug("map (%d) out of range\n", map->map); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: if(map->flags&MAP_ACTIVE){ +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: speed=(map->speed>0)?map->speed:AU1000_PCMCIA_IO_SPEED; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: skt->spd_io[map->map] = speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: map->start=(ioaddr_t)(u32)skt->virt_io; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: map->stop=map->start+MAP_SIZE; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: unsigned short speed = map->speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: if(map->map>=MAX_WIN){ +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: debug("map (%d) out of range\n", map->map); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: if (map->flags & MAP_ATTRIB) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: skt->spd_attr[map->map] = speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: skt->spd_mem[map->map] = 0; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: skt->spd_attr[map->map] = 0; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: skt->spd_mem[map->map] = speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: if (map->flags & MAP_ATTRIB) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: map->static_start = skt->phys_attr + map->card_start; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: map->static_start = skt->phys_mem + map->card_start; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/au1000_generic.c: map->map, map->static_start, map->card_start); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/omap_cf.c: if (map->card_start) +../linux-2.6.17-gentoo-r8/drivers/pcmcia/omap_cf.c: map->static_start = cf->phys_cf; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/omap_cf.c: map->flags &= MAP_ACTIVE|MAP_ATTRIB|MAP_16BIT; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/omap_cf.c: if (map->flags & MAP_ATTRIB) +../linux-2.6.17-gentoo-r8/drivers/pcmcia/omap_cf.c: map->static_start += SZ_2K; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/rsrc_nonstatic.c: for (m = data->map->next; m != data->map; m = m->next) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: unsigned short speed = map->speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->map, map->speed, map->start, map->stop); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags==0)?"":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_ACTIVE)?"ACTIVE ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_16BIT)?"16BIT ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_AUTOSZ)?"AUTOSZ ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_0WS)?"0WS ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_WRPROT)?"WRPROT ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_USE_WAIT)?"USE_WAIT ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_PREFETCH)?"PREFETCH ":""); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: if (map->map >= MAX_IO_WIN) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->map); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: if (map->flags & MAP_ACTIVE) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: skt->spd_io[map->map] = speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: if (map->stop == 1) +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->stop = PAGE_SIZE-1; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->stop -= map->start; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->stop += skt->socket.io_offset; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->start = skt->socket.io_offset; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: unsigned short speed = map->speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->map, map->speed, map->card_start); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags==0)?"":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_ACTIVE)?"ACTIVE ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_16BIT)?"16BIT ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_AUTOSZ)?"AUTOSZ ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_0WS)?"0WS ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_WRPROT)?"WRPROT ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_ATTRIB)?"ATTRIB ":"", +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: (map->flags&MAP_USE_WAIT)?"USE_WAIT ":""); +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: if (map->map >= MAX_WIN) +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: if (map->flags & MAP_ACTIVE) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: if (map->flags & MAP_ATTRIB) { +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: skt->spd_attr[map->map] = speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: skt->spd_mem[map->map] = 0; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: skt->spd_attr[map->map] = 0; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: skt->spd_mem[map->map] = speed; +../linux-2.6.17-gentoo-r8/drivers/pcmcia/soc_common.c: map->static_start = res->start + map->card_start; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: /* ap->flags bits */ +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: ap->id, reason); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: if ((ap->flags & AHCI_FLAG_RESET_NEEDS_CLO) && +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: if ((ap->device[0].class != ATA_DEV_ATAPI) || +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: printk(KERN_WARNING "ata%u: handling error/timeout\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: scsi_remove_host(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: ata_scsi_release(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c: scsi_host_put(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: /* ap->flags bits */ +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: ap->id, reason); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: if ((ap->flags & AHCI_FLAG_RESET_NEEDS_CLO) && +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ahci_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: if ((ap->device[0].class != ATA_DEV_ATAPI) || +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: printk(KERN_WARNING "ata%u: handling error/timeout\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = ahci_port_base(mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: void __iomem *port_mmio = (void __iomem *) ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: scsi_remove_host(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: ata_scsi_release(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/ahci.c.orig: scsi_host_put(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: if ((ap->udma_mask & ~ATA_UDMA_MASK_40C) == 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: mask = ap->hard_port_no == 0 ? PIIX_80C_PRI : PIIX_80C_SEC; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: ap->cbl = ATA_CBL_PATA80; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: ap->cbl = ATA_CBL_PATA40; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: ap->udma_mask &= ATA_UDMA_MASK_40C; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: if (!pci_test_config_bits(pdev, &piix_enable_bits[ap->hard_port_no])) { +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: printk(KERN_INFO "ata%u: port disabled. ignoring.\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: const unsigned int *map = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: int base = 2 * ap->hard_port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: DPRINTK("ata%u: ENTER, pcs=0x%x base=%d\n", ap->id, pcs, base); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: if (ap->flags & PIIX_FLAG_IGNORE_PCS || pcs & 1 << (4 + port)) +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: if (!(ap->flags & PIIX_FLAG_AHCI)) +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: ap->id, pcs, present_mask); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: printk(KERN_INFO "ata%u: SATA port has no device.\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: struct pci_dev *dev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: unsigned int master_port= ap->hard_port_no ? 0x42 : 0x40; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: slave_data &= (ap->hard_port_no ? 0x0f : 0xf0); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: (timings[pio][1] << (ap->hard_port_no ? 4 : 0)); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: struct pci_dev *dev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: u8 maslave = ap->hard_port_no ? 0x42 : 0x40; +../linux-2.6.17-gentoo-r8/drivers/scsi/ata_piix.c: unsigned int drive_dn = (ap->hard_port_no ? 2 : 0) + adev->devno; +../linux-2.6.17-gentoo-r8/drivers/scsi/fcal.c: for (i = 0; i < fc->posmap->len; i++) { +../linux-2.6.17-gentoo-r8/drivers/scsi/fcal.c: alpa = fc->posmap->list[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/fcal.c: for (i = 0; i < fc->posmap->len; i++) { +../linux-2.6.17-gentoo-r8/drivers/scsi/fcal.c: unsigned char alpa = fc->posmap->list[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/iscsi_tcp.c: * Check for iSCSI window and take care of CmdSN wrap-around +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (tf->ctl != ap->last_ctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ap->last_ctl = tf->ctl; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (tf->ctl != ap->last_ctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: writeb(tf->ctl, (void __iomem *) ap->ioaddr.ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ap->last_ctl = tf->ctl; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: DPRINTK("ata%u: cmd 0x%X\n", ap->id, tf->command); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: outb(tf->command, ap->ioaddr.command_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: DPRINTK("ata%u: cmd 0x%X\n", ap->id, tf->command); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: writeb(tf->command, (void __iomem *) ap->ioaddr.command_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: writeb(tf->ctl | ATA_HOB, (void __iomem *) ap->ioaddr.ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: return inb(ap->ioaddr.status_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: return readb((void __iomem *) ap->ioaddr.status_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->ops->check_altstatus) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: return ap->ops->check_altstatus(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: return readb((void __iomem *)ap->ioaddr.altstatus_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: return inb(ap->ioaddr.altstatus_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: writel(ap->prd_dma, mmio + ATA_DMA_TABLE_OFS); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ap->ops->exec_command(ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: outl(ap->prd_dma, ap->ioaddr.bmdma_addr + ATA_DMA_TABLE_OFS); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: dmactl = inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: outb(dmactl, ap->ioaddr.bmdma_addr + ATA_DMA_CMD); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ap->ops->exec_command(ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: dmactl = inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ap->ioaddr.bmdma_addr + ATA_DMA_CMD); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (qc->ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (qc->ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (!ap->ioaddr.bmdma_addr) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ((void __iomem *) ap->ioaddr.bmdma_addr) + ATA_DMA_STATUS; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: unsigned long addr = ap->ioaddr.bmdma_addr + ATA_DMA_STATUS; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: host_stat = inb(ap->ioaddr.bmdma_addr + ATA_DMA_STATUS); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->flags & ATA_FLAG_MMIO) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.bmdma_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: outb(inb(ap->ioaddr.bmdma_addr + ATA_DMA_CMD) & ~ATA_DMA_START, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: ap->ioaddr.bmdma_addr + ATA_DMA_CMD); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-bmdma.c: if (ap->ioaddr.bmdma_addr == 0) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: } else if (lba48 && (qc->ap->flags & ATA_FLAG_PIO_LBA48)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, device); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, device); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, device); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->tf_read(ap, &tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: writeb(tmp, (void __iomem *) ap->ioaddr.device_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outb(tmp, ap->ioaddr.device_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, device, wait); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, device); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (can_sleep && ap->device[device].class == ATA_DEV_ATAPI) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_FLUSH_PORT_TASK) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: PREPARE_WORK(&ap->port_task, fn, data); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: rc = queue_work(ata_wq, &ap->port_task); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: rc = queue_delayed_work(ata_wq, &ap->port_task, delay); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ATA_FLAG_FLUSH_PORT_TASK; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (!cancel_delayed_work(&ap->port_task)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags &= ~ATA_FLAG_FLUSH_PORT_TASK; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc->ap->ops->tf_read(qc->ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, command); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_PORT_DISABLED) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("ENTER, host %u, dev %u\n", ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, reason); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: return ((ap->cbl == ATA_CBL_SATA) && (!ata_id_is_sata(dev->id))); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("ENTER, host %u, dev %u\n", ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, id[49], id[82], id[83], +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: printk(KERN_WARNING "ata%u: unsupported CDB len\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, ata_mode_string(xfer_mask)); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->host->max_cmd_len = 0; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->host->max_cmd_len = max_t(unsigned int, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->host->max_cmd_len, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->device[i].cdb_len); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->dev_config) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_config(ap, dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->probe_reset) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: rc = ap->ops->probe_reset(ap, classes); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: printk("ata%u: reset failed (errno=%d)\n", ap->id, rc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->phy_reset(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (!(ap->flags & ATA_FLAG_PORT_DISABLED)) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: classes[i] = ap->device[i].class; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->set_mode) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->set_mode(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_PORT_DISABLED) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->port_disable(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags &= ~ATA_FLAG_PORT_DISABLED; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (!ap->ops->scr_read) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, speed, sstatus); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, sstatus); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_SATA_RESET) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_PORT_DISABLED) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->cbl = ATA_CBL_SATA; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_PORT_DISABLED) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *pair = &ap->device[1 - adev->devno]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->device[0].class = ATA_DEV_NONE; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->device[1].class = ATA_DEV_NONE; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ATA_FLAG_PORT_DISABLED; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, err_mask); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: printk(KERN_WARNING "ata%u: no PIO support for device %d.\n", ap->id, i); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->set_piomode) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->set_piomode(ap, dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->set_dmamode) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->set_dmamode(ap, dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (used_dma && (ap->host_set->flags & ATA_HOST_SIMPLEX)) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->host_set->simplex_claimed = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->post_set_mode) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->post_set_mode(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->tf_load(ap, tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->exec_command(ap, tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: "please be patient\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, tmout / HZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 1); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 1); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("ata%u: bus reset via SRST\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: writeb(ap->ctl | ATA_SRST, (void __iomem *) ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outb(ap->ctl, ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outb(ap->ctl | ATA_SRST, ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outb(ap->ctl, ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("ENTER, host %u, port %u\n", ap->id, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_SATA_RESET) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_SRST) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->device[0].class = ata_dev_try_classify(ap, 0, &err); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->device[1].class = ata_dev_try_classify(ap, 1, &err); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ioaddr.ctl_addr) /* FIXME: hack. create a hook instead */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->device[1].class != ATA_DEV_NONE) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 1); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->device[0].class != ATA_DEV_NONE) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if ((ap->device[0].class == ATA_DEV_NONE) && +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: (ap->device[1].class == ATA_DEV_NONE)) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & (ATA_FLAG_SATA_RESET | ATA_FLAG_SRST)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: writeb(ap->ctl, (void __iomem *) ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outb(ap->ctl, ioaddr->ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: printk(KERN_ERR "ata%u: disabling port\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->port_disable(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if ((ap->flags & ATA_FLAG_SATA) && ap->ops->scr_read) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: unsigned int slave_possible = ap->flags & ATA_FLAG_SLAVE_POSS; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->scr_read && !sata_dev_present(ap)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, err_mask); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: "(device not ready)\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); /* probably unnecessary */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->cbl == ATA_CBL_NONE && ap->flags & ATA_FLAG_SATA) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->cbl = ATA_CBL_SATA; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->cbl == ATA_CBL_SATA) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ioaddr.ctl_addr) /* FIXME: hack. create a hook instead */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 1); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->dev_select(ap, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ioaddr.ctl_addr) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: writeb(ap->ctl, (void __iomem *) ap->ioaddr.ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outb(ap->ctl, ap->ioaddr.ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_SATA && ap->ops->scr_read) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, dev->class, new_class); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, model[0], model[1]); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, serial[0], serial[1]); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, (unsigned long long)dev->n_sectors, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno, rc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_host_set *hs = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: xfer_mask = ata_pack_xfermask(ap->pio_mask, ap->mwdma_mask, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->udma_mask); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *d = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->cbl == ATA_CBL_PATA40) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: "disabling DMA\n", ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->mode_filter) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: xfer_mask = ap->ops->mode_filter(ap, dev, xfer_mask); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: pad_buf = ap->pad + (qc->tag * ATA_DMA_PAD_SZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: dma_unmap_sg(ap->dev, sg, qc->n_elem, dir); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: dma_unmap_single(ap->dev, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->prd[idx].addr = cpu_to_le32(addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->prd[idx].flags_len = cpu_to_le32(len & 0xffff); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->prd[idx - 1].flags_len |= cpu_to_le32(ATA_PRD_EOT); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->ops->check_atapi_dma) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: rc = ap->ops->check_atapi_dma(qc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: void *pad_buf = ap->pad + (qc->tag * ATA_DMA_PAD_SZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: sg_dma_address(psg) = ap->pad_dma + (qc->tag * ATA_DMA_PAD_SZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: dma_address = dma_map_single(ap->dev, qc->buf_virt, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: VPRINTK("ENTER, ata%u\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: void *pad_buf = ap->pad + (qc->tag * ATA_DMA_PAD_SZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: sg_dma_address(psg) = ap->pad_dma + (qc->tag * ATA_DMA_PAD_SZ); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: n_elem = dma_map_sg(ap->dev, sg, pre_n_elem, dir); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags &= ~ATA_FLAG_NOINTR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: switch (ap->hsm_task_state) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (time_after(jiffies, ap->pio_task_timeout)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_TMOUT; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = poll_state; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = reg_state; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_LAST_POLL; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->pio_task_timeout = jiffies + ATA_TMOUT_PIO; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_ERR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_IDLE; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: void __iomem *mmio = (void __iomem *)ap->ioaddr.data_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outsw(ap->ioaddr.data_addr, buf, words); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: insw(ap->ioaddr.data_addr, buf, words); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: outw(le16_to_cpu(align_buf[0]), ap->ioaddr.data_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: align_buf[0] = cpu_to_le16(inw(ap->ioaddr.data_addr)); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (unlikely(ap->flags & ATA_FLAG_IRQ_MASK)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_MMIO) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_LAST; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_LAST; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, bytes); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_LAST; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->tf_read(ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_ERR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_POLL; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->pio_task_timeout = jiffies + ATA_TMOUT_PIO; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_ERR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_LAST; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_ERR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: printk(KERN_WARNING "ata%u: PIO error\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_IDLE; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: switch (ap->hsm_task_state) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags &= ~ATA_FLAG_NOINTR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->bmdma_start(qc); /* initiate bmdma */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST_IDLE; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: host_stat = ap->ops->bmdma_status(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->bmdma_stop(qc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->irq_clear(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, qc->tf.command, drv_stat, host_stat); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ata_qc_timeout(ata_qc_from_tag(ap, ap->active_tag)); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (!test_and_set_bit(i, &ap->qactive)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (tag == ap->active_tag) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->active_tag = ATA_TAG_POISON; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: clear_bit(tag, &ap->qactive); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_PIO_DMA) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc->ap->active_tag = qc->tag; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->qc_prep(qc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc->err_mask |= ap->ops->qc_issue(qc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->bmdma_setup(qc); /* set up bmdma */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->bmdma_start(qc); /* initiate bmdma */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hsm_task_state = HSM_ST; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ATA_FLAG_NOINTR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ATA_FLAG_NOINTR; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->tf_load(ap, &qc->tf); /* load tf registers */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->bmdma_setup(qc); /* set up bmdma */ +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: host_stat = ap->ops->bmdma_status(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: VPRINTK("ata%u: host_stat 0x%X\n", ap->id, host_stat); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->bmdma_stop(qc); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, qc->tf.protocol, status); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->irq_clear(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->stats.idle_irq++; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if ((ap->stats.idle_irq % 1000) == 0) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: printk(KERN_WARNING "ata%d: irq trap\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (ap->flags & ATA_FLAG_SUSPENDED) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags &= ~ATA_FLAG_SUSPENDED; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ATA_FLAG_SUSPENDED; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct device *dev = ap->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->prd = dma_alloc_coherent(dev, ATA_PRD_TBL_SZ, &ap->prd_dma, GFP_KERNEL); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if (!ap->prd) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: dma_free_coherent(dev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("prd alloc, virt %p, dma %llx\n", ap->prd, (unsigned long long) ap->prd_dma); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct device *dev = ap->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: dma_free_coherent(dev, ATA_PRD_TBL_SZ, ap->prd, ap->prd_dma); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct Scsi_Host *sh = ap->host; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->port_stop(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags = ATA_FLAG_PORT_DISABLED; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id = host->unique_id; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->host = host; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ctl = ATA_DEVCTL_OBS; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->host_set = host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->dev = ent->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->port_no = port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->hard_port_no = +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->pio_mask = ent->pio_mask; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->mwdma_mask = ent->mwdma_mask; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->udma_mask = ent->udma_mask; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ent->host_flags; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags |= ent->port_flags[port_no]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops = ent->port_ops; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->cbl = ATA_CBL_NONE; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->active_tag = ATA_TAG_POISON; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->last_ctl = 0xFF; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: INIT_WORK(&ap->port_task, NULL, NULL); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: INIT_LIST_HEAD(&ap->eh_done_q); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_device *dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->stats.unhandled_irq = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->stats.idle_irq = 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: memcpy(&ap->ioaddr, &ent->port[port_no], sizeof(struct ata_ioports)); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: rc = ap->ops->port_start(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: xfer_mode_mask =(ap->udma_mask << ATA_SHIFT_UDMA) | +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: (ap->mwdma_mask << ATA_SHIFT_MWDMA) | +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: (ap->pio_mask << ATA_SHIFT_PIO); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->flags & ATA_FLAG_SATA ? 'S' : 'P', +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ioaddr.cmd_addr, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ioaddr.ctl_addr, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ioaddr.bmdma_addr, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("ata%u: bus probe begin\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: DPRINTK("ata%u: bus probe end\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: rc = scsi_add_host(ap->host, dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: scsi_remove_host(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ata_scsi_release(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: if ((ap->flags & ATA_FLAG_NO_LEGACY) == 0) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: scsi_host_put(ap->host); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: ap->ops->port_disable(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-core.c: kfree(ap->device[i].id); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: struct ata_device *dev = &ap->device[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: struct ata_device *dev = &ap->device[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: WARN_ON(qc->ap->ops->tf_read == NULL); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: qc->ap->ops->tf_read(qc->ap, tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ata_to_sense_error(qc->ap->id, tf->command, tf->feature, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: WARN_ON(qc->ap->ops->tf_read == NULL); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: qc->ap->ops->tf_read(qc->ap, tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ata_to_sense_error(qc->ap->id, tf->command, tf->feature, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: dev = &ap->device[sdev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: WARN_ON(ap->flags & ATA_FLAG_IN_EH); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->flags |= ATA_FLAG_IN_EH; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: WARN_ON(ata_qc_from_tag(ap, ap->active_tag) == NULL); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->ops->eng_timeout(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: scsi_eh_flush_done_q(&ap->eh_done_q); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->flags &= ~ATA_FLAG_IN_EH; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: scsi_eh_finish_cmd(scmd, &ap->eh_done_q); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ata_dump_status(qc->ap->id, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: return (ap->flags & ATA_FLAG_PIO_DMA); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->ops->tf_read(ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: dev = &ap->device[scsidev->id]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: if (!atapi_enabled || (ap->flags & ATA_FLAG_NO_ATAPI)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->id, dev->devno, atapi_enabled ? "not supported with this driver" : "disabled"); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: if (qc->ap->flags & ATA_FLAG_SLAVE_POSS) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_lock(&ap->host_set->lock); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: spin_unlock(&ap->host_set->lock); +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: if (ap->flags & ATA_FLAG_PORT_DISABLED) +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/libata-scsi.c: scsi_scan_target(&ap->host->shost_gendev, 0, i, 0, 0); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: void __iomem *mmio_base = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: void __iomem *chan = ADMA_REGS(mmio_base, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: writeb(ATA_NIEN, (void __iomem *)ap->ioaddr.ctl_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: void __iomem *chan = ADMA_REGS(ap->host_set->mmio_base, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: void __iomem *chan = ADMA_REGS(ap->host_set->mmio_base, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)) +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: if (ap && (!(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: ap->id, qc->tf.protocol, status); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: struct adma_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: adma_reset_engine(ADMA_REGS(ap->host_set->mmio_base, ap->port_no)); +../linux-2.6.17-gentoo-r8/drivers/scsi/pdc_adma.c: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: return mv_port_base(ap->host_set->mmio_base, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: printk(KERN_ERR "ata%u: Unable to stop eDMA\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: "SERR: 0x%08x\n", ap->id, edma_err_cause, serr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: ap->ioaddr.status_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: if (ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR)) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: void __iomem *mmio = mv5_phy_base(ap->host_set->mmio_base, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: void __iomem *mmio = mv5_phy_base(ap->host_set->mmio_base, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: mv_channel_reset(hpriv, mmio, ap->port_no); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct mv_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: struct ata_device *dev = &ap->device[0]; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: VPRINTK("ENTER, port %u, mmio 0x%p\n", ap->port_no, port_mmio); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: ap->id, scr_read(ap, SCR_STATUS)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: ap->cbl = ATA_CBL_SATA; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: tf.lbah = readb((void __iomem *) ap->ioaddr.lbah_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: tf.lbam = readb((void __iomem *) ap->ioaddr.lbam_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: tf.lbal = readb((void __iomem *) ap->ioaddr.lbal_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: tf.nsect = readb((void __iomem *) ap->ioaddr.nsect_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: printk(KERN_ERR "ata%u: Entering mv_eng_timeout\n",ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: mv_dump_all_regs(ap->host_set->mmio_base, ap->port_no, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: to_pci_dev(ap->host_set->dev)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: ap->host_set->mmio_base, ap, qc, qc->scsicmd, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: spin_lock_irqsave(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_mv.c: spin_unlock_irqrestore(&ap->host_set->lock, flags); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c: !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c: ap->ops->check_status(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c: return ioread32((void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c: iowrite32(val, (void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c.orig: !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c.orig: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c.orig: ap->ops->check_status(ap); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c.orig: return ioread32((void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_nv.c.orig: iowrite32(val, (void __iomem *)ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct pdc_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_CTLSTAT; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: if (ap->flags & ATA_FLAG_SATA) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: void *mmio = (void *) ap->ioaddr.cmd_addr + PDC_CTLSTAT + 0x03; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->cbl = ATA_CBL_PATA40; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->udma_mask &= ATA_UDMA_MASK_40C; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->cbl = ATA_CBL_PATA80; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct pdc_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: i = pdc_pkt_header(&qc->tf, qc->ap->prd_dma, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: printk(KERN_ERR "ata%u: command timeout\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->id, qc->tf.command, drv_stat); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: void __iomem *mmio = (void __iomem *) ap->ioaddr.cmd_addr + PDC_GLOBAL_CTL; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: ap->stats.idle_irq++; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: struct pdc_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: unsigned int port_no = ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: writel(0x00000001, ap->host_set->mmio_base + (seq * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: readl(ap->host_set->mmio_base + (seq * 4)); /* flush */ +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: writel(pp->pkt_dma, (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_promise.c: readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); /* flush */ +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: return readl((void __iomem *)(ap->ioaddr.scr_addr + (sc_reg * 8))); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: writel(val, (void __iomem *)(ap->ioaddr.scr_addr + (sc_reg * 8))); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: u8 __iomem *chan = ap->host_set->mmio_base + (ap->port_no * 0x4000); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = qc->ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: if (ap && !(ap->flags & +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: ap->id, qc->tf.protocol, status); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: void __iomem *mmio_base = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: void __iomem *chan = mmio_base + (ap->port_no * 0x4000); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: struct qs_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_qstor.c: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: host_set->mmio_base + sil_port[ap->port_no].xfer_mode; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: dev = &ap->device[i]; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: unsigned long offset = ap->ioaddr.scr_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: ((ap->flags & SIL_FLAG_MOD15WRITE) && +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: ap->id, dev->devno); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil.c: ap->id, dev->devno, model_num); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: * ap->private_data +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c:/* ap->host_set->private_data */ +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *scr_addr = (void __iomem *)ap->ioaddr.scr_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *scr_addr = (void __iomem *)ap->ioaddr.scr_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: if (__sil24_restart_controller((void __iomem *)ap->ioaddr.cmd_addr)) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: " ata%u: failed to restart controller\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: " ata%u: resetting controller...\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: if (__sil24_reset_controller((void __iomem *)ap->ioaddr.cmd_addr)) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: " ata%u: failed to reset controller\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: printk(KERN_ERR "ata%u: command timeout\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: ap->id, irq_stat); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: if (ap->device[0].class != ATA_DEV_ATAPI || cmd_err > PORT_CERR_SDB) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: ap->id, ap->port_no, slot_stat, irq_stat, cmd_err, sstatus, serror); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct ata_queued_cmd *qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: void __iomem *port = (void __iomem *)ap->ioaddr.cmd_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: if (ap && !(ap->flags & ATA_FLAG_PORT_DISABLED)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sil24.c: struct sil24_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, sc_reg, pdev->device); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: unsigned int cfg_addr = get_scr_cfg_addr(ap->port_no, scr, pdev->device); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: if (ap->flags & SIS_FLAG_CFGSCR) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: val = inl(ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: val2 = inl(ap->ioaddr.scr_addr + (sc_reg * 4) + 0x10); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: if (ap->flags & SIS_FLAG_CFGSCR) +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: outl(val, ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sis.c: outl(val, ap->ioaddr.scr_addr + (sc_reg * 4)+0x10); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: return readl((void *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: writel(val, (void *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: if (tf->ctl != ap->last_ctl) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: ap->last_ctl = tf->ctl; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: void *mmio = (void *) ap->ioaddr.bmdma_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: writel(ap->prd_dma, mmio + ATA_DMA_TABLE_OFS); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: ap->ops->exec_command(ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: void *mmio = (void *) ap->ioaddr.bmdma_addr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: ap->ops->exec_command(ap, &qc->tf); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: return readl((void *) ap->ioaddr.status_addr); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: np = pci_device_to_OF_node(to_pci_dev(ap->host_set->dev)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_svw.c: index = (ap == ap->host_set->ports[0]) ? 0 : 1; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: ap->private_data = pp; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct device *dev = ap->host_set->dev; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: ap->private_data = NULL; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: ap->cbl = ATA_CBL_SATA; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: unsigned int portno = ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: ENTER\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_port_priv *pp = ap->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: void __iomem *mmio = ap->host_set->mmio_base; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: unsigned int portno = ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: ENTER\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_host_priv *pp = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_host_priv *pp = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: unsigned int port_no = ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct pdc_host_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: unsigned int port_no = ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: ENTER\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: unsigned int port_no = ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: read hdma, 0x%x 0x%x\n", ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: read ata, 0x%x 0x%x\n", ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: write hdma, 0x%x 0x%x\n", ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: (void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: readl((void __iomem *) ap->ioaddr.cmd_addr + PDC_PKT_SUBMIT); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: VPRINTK("ata%u: write ata, 0x%x 0x%x\n", ap->id, +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: ap->stats.idle_irq++; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: !(ap->flags & (ATA_FLAG_PORT_DISABLED | ATA_FLAG_NOINTR))) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: struct ata_host_set *host_set = ap->host_set; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: printk(KERN_ERR "ata%u: command timeout\n", ap->id); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_sx4.c: ap->id, qc->tf.command, drv_stat); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_uli.c: struct uli_priv *hpriv = ap->host_set->private_data; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_uli.c: return hpriv->scr_cfg_addr[ap->port_no] + (4 * sc_reg); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_uli.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_uli.c: struct pci_dev *pdev = to_pci_dev(ap->host_set->dev); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_via.c: return inl(ap->ioaddr.scr_addr + (4 * sc_reg)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_via.c: outl(val, ap->ioaddr.scr_addr + (4 * sc_reg)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: return readl((void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: writel(val, (void __iomem *) ap->ioaddr.scr_addr + (sc_reg * 4)); +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: mask_addr = ap->host_set->mmio_base + +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: VSC_SATA_INT_MASK_OFFSET + ap->port_no; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: if ((tf->ctl & ATA_NIEN) != (ap->last_ctl & ATA_NIEN)) { +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: ap->last_ctl = tf->ctl; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: struct ata_ioports *ioaddr = &ap->ioaddr; +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: if (ap && !(ap->flags & +../linux-2.6.17-gentoo-r8/drivers/scsi/sata_vsc.c: qc = ata_qc_from_tag(ap, ap->active_tag); +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c:/* immap->im_ioport.iop_papar |= 0x00fc; */ +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c:/* immap->im_ioport.iop_padir &= ~0x00fc; */ +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c:/* immap->im_ioport.iop_paodr &= ~0x00fc; */ +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c:/* immap->im_ioport.iop_pcdir |= 0x03c6; */ +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c:/* immap->im_ioport.iop_pcpar &= ~0x03c6; */ +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c: immap->im_ioport.iop_pcdir |= 0x000c; +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c: immap->im_ioport.iop_pcpar &= ~0x000c; +../linux-2.6.17-gentoo-r8/drivers/serial/68360serial.c: immap->im_ioport.iop_pcdat &= ~0x000c; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: writel(0, uap->port.membase + UART010_ICR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: status = readb(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: delta = status ^ uap->old_status; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uap->old_status = status; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uart_handle_dcd_change(&uap->port, status & UART01x_FR_DCD); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uap->port.icount.dsr++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: wake_up_interruptible(&uap->port.info->delta_msr_wait); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: if (uap->data) +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uap->data->set_mctrl(uap->dev, uap->port.membase, mctrl); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uap->old_status = readb(port->membase + UART01x_FR) & UART01x_FR_MODEM_ANY; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uart_suspend_port(&amba_reg, &uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl010.c: uart_resume_port(&amba_reg, &uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->im &= ~UART011_TXIM; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->im, uap->port.membase + UART011_IMSC); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->im |= UART011_TXIM; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->im, uap->port.membase + UART011_IMSC); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->im &= ~(UART011_RXIM|UART011_RTIM|UART011_FEIM| +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->im, uap->port.membase + UART011_IMSC); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->im |= UART011_RIMIM|UART011_CTSMIM|UART011_DCDMIM|UART011_DSRMIM; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->im, uap->port.membase + UART011_IMSC); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: struct tty_struct *tty = uap->port.info->tty; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: status = readw(uap->port.membase + UART01x_FR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: ch = readw(uap->port.membase + UART01x_DR) | UART_DUMMY_DR_RX; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.rx++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.brk++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: if (uart_handle_break(&uap->port)) +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.parity++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.frame++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.overrun++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: ch &= uap->port.read_status_mask; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: if (uart_handle_sysrq_char(&uap->port, ch & 255, regs)) +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uart_insert_char(&uap->port, ch, UART011_DR_OE, ch, flag); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: status = readw(uap->port.membase + UART01x_FR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: struct circ_buf *xmit = &uap->port.info->xmit; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: if (uap->port.x_char) { +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->port.x_char, uap->port.membase + UART01x_DR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.tx++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.x_char = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: if (uart_circ_empty(xmit) || uart_tx_stopped(&uap->port)) { +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: pl011_stop_tx(&uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: count = uap->port.fifosize >> 1; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(xmit->buf[xmit->tail], uap->port.membase + UART01x_DR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.tx++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uart_write_wakeup(&uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: pl011_stop_tx(&uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: status = readw(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: delta = status ^ uap->old_status; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->old_status = status; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uart_handle_dcd_change(&uap->port, status & UART01x_FR_DCD); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.icount.dsr++; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uart_handle_cts_change(&uap->port, status & UART01x_FR_CTS); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: wake_up_interruptible(&uap->port.info->delta_msr_wait); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_lock(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: status = readw(uap->port.membase + UART011_MIS); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.membase + UART011_ICR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: status = readw(uap->port.membase + UART011_MIS); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_unlock(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: unsigned int status = readw(uap->port.membase + UART01x_FR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: unsigned int status = readw(uap->port.membase + UART01x_FR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: cr = readw(uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(cr, uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_lock_irqsave(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: lcr_h = readw(uap->port.membase + UART011_LCRH); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(lcr_h, uap->port.membase + UART011_LCRH); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_unlock_irqrestore(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: retval = clk_enable(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.uartclk = clk_get_rate(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: retval = request_irq(uap->port.irq, pl011_int, 0, "uart-pl011", uap); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.membase + UART011_IFLS); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(cr, uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(0, uap->port.membase + UART011_FBRD); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(1, uap->port.membase + UART011_IBRD); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(0, uap->port.membase + UART011_LCRH); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(0, uap->port.membase + UART01x_DR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_BUSY) +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(cr, uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->old_status = readw(uap->port.membase + UART01x_FR) & UART01x_FR_MODEM_ANY; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_lock_irq(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->im = UART011_RXIM | UART011_RTIM; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->im, uap->port.membase + UART011_IMSC); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_unlock_irq(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: clk_disable(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_lock_irq(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->im = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(uap->im, uap->port.membase + UART011_IMSC); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(0xffff, uap->port.membase + UART011_ICR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: spin_unlock_irq(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: free_irq(uap->port.irq, uap); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(UART01x_CR_UARTEN | UART011_CR_TXE, uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: val = readw(uap->port.membase + UART011_LCRH); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(val, uap->port.membase + UART011_LCRH); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: clk_disable(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: while (readw(uap->port.membase + UART01x_FR) & UART01x_FR_TXFF) +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(ch, uap->port.membase + UART01x_DR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: clk_enable(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: old_cr = readw(uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(new_cr, uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uart_console_write(&uap->port, s, count, pl011_console_putchar); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: status = readw(uap->port.membase + UART01x_FR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: writew(old_cr, uap->port.membase + UART011_CR); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: clk_disable(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: if (readw(uap->port.membase + UART011_CR) & UART01x_CR_UARTEN) { +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: lcr_h = readw(uap->port.membase + UART011_LCRH); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: ibrd = readw(uap->port.membase + UART011_IBRD); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: fbrd = readw(uap->port.membase + UART011_FBRD); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: *baud = uap->port.uartclk * 4 / (64 * ibrd + fbrd); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.uartclk = clk_get_rate(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: return uart_set_options(&uap->port, co, baud, parity, bits, flow); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->clk = clk_get(&dev->dev, "UARTCLK"); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: if (IS_ERR(uap->clk)) { +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: ret = PTR_ERR(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.dev = &dev->dev; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.mapbase = dev->res.start; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.membase = base; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.iotype = UPIO_MEM; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.irq = dev->irq[0]; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.fifosize = 16; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.ops = &amba_pl011_pops; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.flags = UPF_BOOT_AUTOCONF; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uap->port.line = i; +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: ret = uart_add_one_port(&amba_reg, &uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: clk_put(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: uart_remove_one_port(&amba_reg, &uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: iounmap(uap->port.membase); +../linux-2.6.17-gentoo-r8/drivers/serial/amba-pl011.c: clk_put(uap->clk); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: * - maybe put something right into uap->clk_divisor +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_REGS_HELD; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmz_load_zsregs(uap, uap->curregs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->port.info == NULL || uap->port.info->tty == NULL) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: tty = uap->port.info->tty; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: ch &= uap->parity_mask; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ch == 0 && uap->flags & PMACZILOG_FLAG_BREAK) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_BREAK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.sysrq = jiffies + HZ*5; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->port.sysrq) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_unlock(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: swallow = uart_handle_sysrq_char(&uap->port, ch, regs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_lock(&uap->port.lock); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.rx++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.brk++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uart_handle_break(&uap->port)) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.parity++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.frame++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.overrun++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: r1 &= uap->port.read_status_mask; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->port.ignore_status_mask == 0xff || +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: (r1 & uap->port.ignore_status_mask) == 0) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] &= ~(EXT_INT_ENAB | TxINT_ENAB | RxINT_MASK); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[R1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, "pmz: rx irq flood !\n"); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.dsr++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if ((status ^ uap->prev_status) & DCD) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uart_handle_dcd_change(&uap->port, +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if ((status ^ uap->prev_status) & CTS) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uart_handle_cts_change(&uap->port, +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: wake_up_interruptible(&uap->port.info->delta_msr_wait); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_BREAK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->prev_status = status; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_TX_ACTIVE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmz_load_zsregs(uap, uap->curregs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_REGS_HELD; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_TX_STOPPED; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->port.x_char) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsdata(uap, uap->port.x_char); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.tx++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.x_char = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->port.info == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: xmit = &uap->port.info->xmit; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uart_write_wakeup(&uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uart_tx_stopped(&uap->port)) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.icount.tx++; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uart_write_wakeup(&uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_lock_irqsave(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_unlock_irqrestore(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_ASLEEP(uap) || uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] |= set_bits; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~clear_bits; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: set_bits, clear_bits, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_ASLEEP(uap) || uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_TX_ACTIVE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_TX_STOPPED; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_ASLEEP(uap) || uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uart_write_wakeup(&uap->port); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_ASLEEP(uap) || uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] &= ~RxINT_MASK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_IRDA(uap) || uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: new_reg = uap->curregs[R15] | (DCDIE | SYNCIE | CTSIE); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (new_reg != uap->curregs[R15]) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R15] = new_reg; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R15, uap->curregs[R15]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: new_reg = (uap->curregs[R5] | set_bits) & ~clear_bits; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (new_reg != uap->curregs[R5]) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] = new_reg; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: PMAC_FTR_SCC_ENABLE, uap->node, uap->port_type, 1); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: PMAC_FTR_MODEM_ENABLE, uap->node, 0, 1); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: PMAC_FTR_MODEM_ENABLE, uap->node, 0, 0); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmac_call_feature(PMAC_FTR_SCC_ENABLE, uap->node, uap->port_type, 0); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: memset(&uap->curregs, 0, sizeof(uap->curregs)); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R9] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R4] = X16CLK | SB1; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R3] = Rx8; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] = Tx8 | RTS; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] |= DTR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R12] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R13] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R14] = BRENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R15] = BRKIE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R9] |= NV | MIE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmz_load_zsregs(uap, uap->curregs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R3, uap->curregs[R3] |= RxENABLE); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5] |= TxENABLE); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->prev_status = read_zsreg(uap, R0); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] |= DTR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~DTR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_OPEN; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (request_irq(uap->port.irq, pmz_interrupt, SA_SHIRQ, "PowerMac Zilog", uap)) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] |= INT_ALL_Rx | TxINT_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] |= EXT_INT_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[R1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: free_irq(uap->port.irq, uap); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_IS_OPEN; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (!ZS_IS_OPEN(uap->mate)) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] &= ~(EXT_INT_ENAB | TxINT_ENAB | RxINT_MASK); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[R1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R3] &= ~RxENABLE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~TxENABLE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~SND_BRK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R4] = X1CLK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R11] = RCTRxCP | TCTRxCP; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R14] = 0; /* BRG off */ +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R12] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R13] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_EXTCLK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R4] = X16CLK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R11] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R14] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R4] = X32CLK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R11] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R14] = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R4] = X16CLK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R11] = TCBR | RCBR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R12] = (brg & 255); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R13] = ((brg >> 8) & 255); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R14] = BRENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_IS_EXTCLK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[3] &= ~RxN_MASK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[5] &= ~TxN_MASK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[3] |= Rx5; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[5] |= Tx5; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->parity_mask = 0x1f; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[3] |= Rx6; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[5] |= Tx6; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->parity_mask = 0x3f; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[3] |= Rx7; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[5] |= Tx7; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->parity_mask = 0x7f; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[3] |= Rx8; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[5] |= Tx8; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->parity_mask = 0xff; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] &= ~(SB_MASK); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] |= SB2; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] |= SB1; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] |= PAR_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] &= ~PAR_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] |= PAR_EVEN; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[4] &= ~PAR_EVEN; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.read_status_mask = Rx_OVR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.read_status_mask |= CRC_ERR | PAR_ERR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.read_status_mask |= BRK_ABRT; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.ignore_status_mask = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.ignore_status_mask |= CRC_ERR | PAR_ERR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.ignore_status_mask |= BRK_ABRT; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.ignore_status_mask |= Rx_OVR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.ignore_status_mask = 0xff; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, "transmitter didn't drain\n"); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, "receiver didn't drain\n"); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] |= DTR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmz_load_zsregs(uap, uap->curregs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_info(&uap->dev->ofdev.dev, "IrDA: dongle version %d not supported\n", +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_err(&uap->dev->ofdev.dev, +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: dev_info(&uap->dev->ofdev.dev, "IrDA setup for %ld bps, dongle version: %d\n", +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~DTR; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[R5]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: memcpy(&uap->termios_cache, termios, sizeof(struct termios)); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmz_load_zsregs(uap, uap->curregs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (UART_ENABLE_MS(&uap->port, termios->c_cflag)) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R15] |= DCDIE | SYNCIE | CTSIE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_MODEM_STATUS; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R15] &= ~(DCDIE | SYNCIE | CTSIE); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_MODEM_STATUS; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] &= ~(EXT_INT_ENAB | TxINT_ENAB | RxINT_MASK); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[R1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] |= INT_ALL_Rx | TxINT_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] |= EXT_INT_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[R1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: struct device_node *np = uap->node; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.mapbase = r_ports.start; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.membase = ioremap(uap->port.mapbase, 0x1000); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->control_reg = uap->port.membase; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->data_reg = uap->control_reg + 0x10; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_HAS_DMA; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->tx_dma_regs = ioremap(r_txdma.start, 0x100); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->tx_dma_regs == NULL) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->rx_dma_regs = ioremap(r_rxdma.start, 0x100); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->rx_dma_regs == NULL) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: iounmap(uap->tx_dma_regs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->tx_dma_regs = NULL; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_HAS_DMA; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->tx_dma_irq = np->intrs[1].line; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->rx_dma_irq = np->intrs[2].line; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_IRDA; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port_type = PMAC_SCC_ASYNC; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_IRDA; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_INTMODEM; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port_type = PMAC_SCC_IRDA; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port_type = PMAC_SCC_I2S1; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.iotype = UPIO_MEM; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.irq = np->intrs[0].line; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.uartclk = ZS_CLOCK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.fifosize = 1; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.ops = &pmz_pops; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.type = PORT_PMAC_ZILOG; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.flags = 0; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: np = uap->node; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: iounmap(uap->rx_dma_regs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: iounmap(uap->tx_dma_regs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: iounmap(uap->control_reg); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->node = NULL; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->dev = mdev; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (macio_request_resources(uap->dev, "pmac_zilog")) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->node->name); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_RSRC_REQUESTED; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->flags & PMACZILOG_FLAG_RSRC_REQUESTED) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: macio_release_resources(uap->dev); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags &= ~PMACZILOG_FLAG_RSRC_REQUESTED; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->dev = NULL; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: state = pmz_uart_reg.state + uap->port.line; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_lock_irqsave(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R3] &= ~RxENABLE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~TxENABLE; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] &= ~(EXT_INT_ENAB | TxINT_ENAB | RxINT_MASK); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R5] &= ~SND_BRK; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: pmz_load_zsregs(uap, uap->curregs); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_ASLEEP; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_unlock_irqrestore(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_OPEN(uap) || ZS_IS_OPEN(uap->mate)) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (ZS_IS_ASLEEP(uap->mate) && ZS_IS_IRQ_ON(pmz_get_port_A(uap))) { +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: disable_irq(uap->port.irq); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.cons->flags &= ~CON_ENABLED; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: state = pmz_uart_reg.state + uap->port.line; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_lock_irqsave(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_unlock_irqrestore(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: __pmz_set_termios(&uap->port, &uap->termios_cache, NULL); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] |= INT_ALL_Rx | TxINT_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->curregs[R1] |= EXT_INT_ENAB; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[R1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_unlock_irqrestore(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->port.cons->flags |= CON_ENABLED; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: enable_irq(uap->port.irq); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_lock_irqsave(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[1] & ~TxINT_ENAB); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R5, uap->curregs[5] | TxENABLE | RTS | DTR); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uart_console_write(&uap->port, s, count, pmz_console_putchar); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: write_zsreg(uap, R1, uap->curregs[1]); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: spin_unlock_irqrestore(&uap->port.lock, flags); +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: if (uap->node == NULL) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: port = &uap->port; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.c: uap->flags |= PMACZILOG_FLAG_IS_CONS; +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.h:#define pmz_debug(fmt,arg...) dev_dbg(&uap->dev->ofdev.dev, fmt, ## arg) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.h: if (uap->flags & PMACZILOG_FLAG_IS_CHANNEL_A) +../linux-2.6.17-gentoo-r8/drivers/serial/pmac_zilog.h: return uap->mate; +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: if (!map->size) +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: if (map->poff & 0x80000000) +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: map->poff = (map->poff & 0x7fffffff) + rphys - phys; +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: map->size >= 0x100000 && +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: map->size <= 0x400000) +../linux-2.6.17-gentoo-r8/drivers/video/cg14.c: map->size *= 2; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (cmap->len != len) { +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (!(cmap->red = kmalloc(size, GFP_ATOMIC))) +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (!(cmap->green = kmalloc(size, GFP_ATOMIC))) +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (!(cmap->blue = kmalloc(size, GFP_ATOMIC))) +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (!(cmap->transp = kmalloc(size, GFP_ATOMIC))) +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: cmap->transp = NULL; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: cmap->start = 0; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: cmap->len = len; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: kfree(cmap->red); +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: kfree(cmap->green); +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: kfree(cmap->blue); +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: kfree(cmap->transp); +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: cmap->red = cmap->green = cmap->blue = cmap->transp = NULL; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: cmap->len = 0; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: red = cmap->red; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: green = cmap->green; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: blue = cmap->blue; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: transp = cmap->transp; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: start = cmap->start; +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: for (i = 0; i < cmap->len; i++) { +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: int rc, size = cmap->len * sizeof(u16); +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (cmap->start < 0 || (!info->fbops->fb_setcolreg && +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: rc = fb_alloc_cmap(&umap, cmap->len, cmap->transp != NULL); +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: if (copy_from_user(umap.red, cmap->red, size) || +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: copy_from_user(umap.green, cmap->green, size) || +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: copy_from_user(umap.blue, cmap->blue, size) || +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: (cmap->transp && copy_from_user(umap.transp, cmap->transp, size))) { +../linux-2.6.17-gentoo-r8/drivers/video/fbcmap.c: umap.start = cmap->start; +../linux-2.6.17-gentoo-r8/drivers/video/fbmem.c: if (copy_in_user(&cmap->start, &cmap32->start, 2 * sizeof(__u32))) +../linux-2.6.17-gentoo-r8/drivers/video/fbmem.c: put_user(compat_ptr(data), &cmap->red) || +../linux-2.6.17-gentoo-r8/drivers/video/fbmem.c: put_user(compat_ptr(data), &cmap->green) || +../linux-2.6.17-gentoo-r8/drivers/video/fbmem.c: put_user(compat_ptr(data), &cmap->blue) || +../linux-2.6.17-gentoo-r8/drivers/video/fbmem.c: put_user(compat_ptr(data), &cmap->transp)) +../linux-2.6.17-gentoo-r8/drivers/video/fbmem.c: &cmap->start, +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: for (map = mac_modes; map->vmode != -1; map++) +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: if (map->vmode == vmode) { +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: mode = map->mode; +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: for (map = mac_modes; map->vmode != -1; map++) { +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: mode = map->mode; +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: *vmode = map->vmode; +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: for (map = mac_monitors; map->sense != -1; map++) +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: if (map->sense == sense) +../linux-2.6.17-gentoo-r8/drivers/video/macmodes.c: return map->vmode; +../linux-2.6.17-gentoo-r8/drivers/video/pmag-aa-fb.c: if (cmap->start == 0 +../linux-2.6.17-gentoo-r8/drivers/video/pmag-aa-fb.c: && cmap->len == 2 +../linux-2.6.17-gentoo-r8/drivers/video/pmag-aa-fb.c: && memcmp(cmap->red, color, sizeof(color)) == 0 +../linux-2.6.17-gentoo-r8/drivers/video/pmag-aa-fb.c: && memcmp(cmap->green, color, sizeof(color)) == 0 +../linux-2.6.17-gentoo-r8/drivers/video/pmag-aa-fb.c: && memcmp(cmap->blue, color, sizeof(color)) == 0 +../linux-2.6.17-gentoo-r8/drivers/video/pmag-aa-fb.c: && cmap->transp == NULL) +../linux-2.6.17-gentoo-r8/drivers/video/pvr2fb.c: fb_info->node, pvr2fb_map->sq_addr); +../linux-2.6.17-gentoo-r8/drivers/video/sbuslib.c: if (index + count > cmap->len) +../linux-2.6.17-gentoo-r8/drivers/video/sbuslib.c: red = cmap->red[index + i] >> 8; +../linux-2.6.17-gentoo-r8/drivers/video/sbuslib.c: green = cmap->green[index + i] >> 8; +../linux-2.6.17-gentoo-r8/drivers/video/sbuslib.c: blue = cmap->blue[index + i] >> 8; +../linux-2.6.17-gentoo-r8/drivers/video/sun3fb.c: (*fb->loadcmap)(fb, &fb_display[con], cmap->start, cmap->len); +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: if (cmap->start + cmap->len > info->cmap.start + +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: info->cmap.len || cmap->start < info->cmap.start) +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: entries = vmalloc(sizeof(struct vesafb_pal_entry) * cmap->len); +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: for (i = 0; i < cmap->len; i++) { +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: entries[i].red = cmap->red[i] >> shift; +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: entries[i].green = cmap->green[i] >> shift; +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: entries[i].blue = cmap->blue[i] >> shift; +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: ret = vesafb_setpalette(entries, cmap->len, cmap->start, info); +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: for (i = 0; i < cmap->len; i++) { +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: ret += vesafb_setcolreg(cmap->start + i, cmap->red[i], +../linux-2.6.17-gentoo-r8/drivers/video/vesafb-tng.c: cmap->green[i], cmap->blue[i],