linux/drivers/ata/libata-scsi.c
<<
>>
Prefs
   1/*
   2 *  libata-scsi.c - helper library for ATA
   3 *
   4 *  Maintained by:  Jeff Garzik <jgarzik@pobox.com>
   5 *                  Please ALWAYS copy linux-ide@vger.kernel.org
   6 *                  on emails.
   7 *
   8 *  Copyright 2003-2004 Red Hat, Inc.  All rights reserved.
   9 *  Copyright 2003-2004 Jeff Garzik
  10 *
  11 *
  12 *  This program is free software; you can redistribute it and/or modify
  13 *  it under the terms of the GNU General Public License as published by
  14 *  the Free Software Foundation; either version 2, or (at your option)
  15 *  any later version.
  16 *
  17 *  This program is distributed in the hope that it will be useful,
  18 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
  19 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  20 *  GNU General Public License for more details.
  21 *
  22 *  You should have received a copy of the GNU General Public License
  23 *  along with this program; see the file COPYING.  If not, write to
  24 *  the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  25 *
  26 *
  27 *  libata documentation is available via 'make {ps|pdf}docs',
  28 *  as Documentation/DocBook/libata.*
  29 *
  30 *  Hardware documentation available from
  31 *  - http://www.t10.org/
  32 *  - http://www.t13.org/
  33 *
  34 */
  35
  36#include <linux/slab.h>
  37#include <linux/kernel.h>
  38#include <linux/blkdev.h>
  39#include <linux/spinlock.h>
  40#include <linux/export.h>
  41#include <scsi/scsi.h>
  42#include <scsi/scsi_host.h>
  43#include <scsi/scsi_cmnd.h>
  44#include <scsi/scsi_eh.h>
  45#include <scsi/scsi_device.h>
  46#include <scsi/scsi_tcq.h>
  47#include <scsi/scsi_transport.h>
  48#include <linux/libata.h>
  49#include <linux/hdreg.h>
  50#include <linux/uaccess.h>
  51#include <linux/suspend.h>
  52#include <asm/unaligned.h>
  53
  54#include "libata.h"
  55#include "libata-transport.h"
  56
  57#define ATA_SCSI_RBUF_SIZE      4096
  58
  59static DEFINE_SPINLOCK(ata_scsi_rbuf_lock);
  60static u8 ata_scsi_rbuf[ATA_SCSI_RBUF_SIZE];
  61
  62typedef unsigned int (*ata_xlat_func_t)(struct ata_queued_cmd *qc);
  63
  64static struct ata_device *__ata_scsi_find_dev(struct ata_port *ap,
  65                                        const struct scsi_device *scsidev);
  66static struct ata_device *ata_scsi_find_dev(struct ata_port *ap,
  67                                            const struct scsi_device *scsidev);
  68
  69#define RW_RECOVERY_MPAGE 0x1
  70#define RW_RECOVERY_MPAGE_LEN 12
  71#define CACHE_MPAGE 0x8
  72#define CACHE_MPAGE_LEN 20
  73#define CONTROL_MPAGE 0xa
  74#define CONTROL_MPAGE_LEN 12
  75#define ALL_MPAGES 0x3f
  76#define ALL_SUB_MPAGES 0xff
  77
  78
  79static const u8 def_rw_recovery_mpage[RW_RECOVERY_MPAGE_LEN] = {
  80        RW_RECOVERY_MPAGE,
  81        RW_RECOVERY_MPAGE_LEN - 2,
  82        (1 << 7),       /* AWRE */
  83        0,              /* read retry count */
  84        0, 0, 0, 0,
  85        0,              /* write retry count */
  86        0, 0, 0
  87};
  88
  89static const u8 def_cache_mpage[CACHE_MPAGE_LEN] = {
  90        CACHE_MPAGE,
  91        CACHE_MPAGE_LEN - 2,
  92        0,              /* contains WCE, needs to be 0 for logic */
  93        0, 0, 0, 0, 0, 0, 0, 0, 0,
  94        0,              /* contains DRA, needs to be 0 for logic */
  95        0, 0, 0, 0, 0, 0, 0
  96};
  97
  98static const u8 def_control_mpage[CONTROL_MPAGE_LEN] = {
  99        CONTROL_MPAGE,
 100        CONTROL_MPAGE_LEN - 2,
 101        2,      /* DSENSE=0, GLTSD=1 */
 102        0,      /* [QAM+QERR may be 1, see 05-359r1] */
 103        0, 0, 0, 0, 0xff, 0xff,
 104        0, 30   /* extended self test time, see 05-359r1 */
 105};
 106
 107static const char *ata_lpm_policy_names[] = {
 108        [ATA_LPM_UNKNOWN]       = "max_performance",
 109        [ATA_LPM_MAX_POWER]     = "max_performance",
 110        [ATA_LPM_MED_POWER]     = "medium_power",
 111        [ATA_LPM_MIN_POWER]     = "min_power",
 112};
 113
 114static ssize_t ata_scsi_lpm_store(struct device *dev,
 115                                  struct device_attribute *attr,
 116                                  const char *buf, size_t count)
 117{
 118        struct Scsi_Host *shost = class_to_shost(dev);
 119        struct ata_port *ap = ata_shost_to_port(shost);
 120        enum ata_lpm_policy policy;
 121        unsigned long flags;
 122
 123        /* UNKNOWN is internal state, iterate from MAX_POWER */
 124        for (policy = ATA_LPM_MAX_POWER;
 125             policy < ARRAY_SIZE(ata_lpm_policy_names); policy++) {
 126                const char *name = ata_lpm_policy_names[policy];
 127
 128                if (strncmp(name, buf, strlen(name)) == 0)
 129                        break;
 130        }
 131        if (policy == ARRAY_SIZE(ata_lpm_policy_names))
 132                return -EINVAL;
 133
 134        spin_lock_irqsave(ap->lock, flags);
 135        ap->target_lpm_policy = policy;
 136        ata_port_schedule_eh(ap);
 137        spin_unlock_irqrestore(ap->lock, flags);
 138
 139        return count;
 140}
 141
 142static ssize_t ata_scsi_lpm_show(struct device *dev,
 143                                 struct device_attribute *attr, char *buf)
 144{
 145        struct Scsi_Host *shost = class_to_shost(dev);
 146        struct ata_port *ap = ata_shost_to_port(shost);
 147
 148        if (ap->target_lpm_policy >= ARRAY_SIZE(ata_lpm_policy_names))
 149                return -EINVAL;
 150
 151        return snprintf(buf, PAGE_SIZE, "%s\n",
 152                        ata_lpm_policy_names[ap->target_lpm_policy]);
 153}
 154DEVICE_ATTR(link_power_management_policy, S_IRUGO | S_IWUSR,
 155            ata_scsi_lpm_show, ata_scsi_lpm_store);
 156EXPORT_SYMBOL_GPL(dev_attr_link_power_management_policy);
 157
 158static ssize_t ata_scsi_park_show(struct device *device,
 159                                  struct device_attribute *attr, char *buf)
 160{
 161        struct scsi_device *sdev = to_scsi_device(device);
 162        struct ata_port *ap;
 163        struct ata_link *link;
 164        struct ata_device *dev;
 165        unsigned long flags, now;
 166        unsigned int uninitialized_var(msecs);
 167        int rc = 0;
 168
 169        ap = ata_shost_to_port(sdev->host);
 170
 171        spin_lock_irqsave(ap->lock, flags);
 172        dev = ata_scsi_find_dev(ap, sdev);
 173        if (!dev) {
 174                rc = -ENODEV;
 175                goto unlock;
 176        }
 177        if (dev->flags & ATA_DFLAG_NO_UNLOAD) {
 178                rc = -EOPNOTSUPP;
 179                goto unlock;
 180        }
 181
 182        link = dev->link;
 183        now = jiffies;
 184        if (ap->pflags & ATA_PFLAG_EH_IN_PROGRESS &&
 185            link->eh_context.unloaded_mask & (1 << dev->devno) &&
 186            time_after(dev->unpark_deadline, now))
 187                msecs = jiffies_to_msecs(dev->unpark_deadline - now);
 188        else
 189                msecs = 0;
 190
 191unlock:
 192        spin_unlock_irq(ap->lock);
 193
 194        return rc ? rc : snprintf(buf, 20, "%u\n", msecs);
 195}
 196
 197static ssize_t ata_scsi_park_store(struct device *device,
 198                                   struct device_attribute *attr,
 199                                   const char *buf, size_t len)
 200{
 201        struct scsi_device *sdev = to_scsi_device(device);
 202        struct ata_port *ap;
 203        struct ata_device *dev;
 204        long int input;
 205        unsigned long flags;
 206        int rc;
 207
 208        rc = strict_strtol(buf, 10, &input);
 209        if (rc || input < -2)
 210                return -EINVAL;
 211        if (input > ATA_TMOUT_MAX_PARK) {
 212                rc = -EOVERFLOW;
 213                input = ATA_TMOUT_MAX_PARK;
 214        }
 215
 216        ap = ata_shost_to_port(sdev->host);
 217
 218        spin_lock_irqsave(ap->lock, flags);
 219        dev = ata_scsi_find_dev(ap, sdev);
 220        if (unlikely(!dev)) {
 221                rc = -ENODEV;
 222                goto unlock;
 223        }
 224        if (dev->class != ATA_DEV_ATA) {
 225                rc = -EOPNOTSUPP;
 226                goto unlock;
 227        }
 228
 229        if (input >= 0) {
 230                if (dev->flags & ATA_DFLAG_NO_UNLOAD) {
 231                        rc = -EOPNOTSUPP;
 232                        goto unlock;
 233                }
 234
 235                dev->unpark_deadline = ata_deadline(jiffies, input);
 236                dev->link->eh_info.dev_action[dev->devno] |= ATA_EH_PARK;
 237                ata_port_schedule_eh(ap);
 238                complete(&ap->park_req_pending);
 239        } else {
 240                switch (input) {
 241                case -1:
 242                        dev->flags &= ~ATA_DFLAG_NO_UNLOAD;
 243                        break;
 244                case -2:
 245                        dev->flags |= ATA_DFLAG_NO_UNLOAD;
 246                        break;
 247                }
 248        }
 249unlock:
 250        spin_unlock_irqrestore(ap->lock, flags);
 251
 252        return rc ? rc : len;
 253}
 254DEVICE_ATTR(unload_heads, S_IRUGO | S_IWUSR,
 255            ata_scsi_park_show, ata_scsi_park_store);
 256EXPORT_SYMBOL_GPL(dev_attr_unload_heads);
 257
 258static void ata_scsi_set_sense(struct scsi_cmnd *cmd, u8 sk, u8 asc, u8 ascq)
 259{
 260        cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
 261
 262        scsi_build_sense_buffer(0, cmd->sense_buffer, sk, asc, ascq);
 263}
 264
 265static ssize_t
 266ata_scsi_em_message_store(struct device *dev, struct device_attribute *attr,
 267                          const char *buf, size_t count)
 268{
 269        struct Scsi_Host *shost = class_to_shost(dev);
 270        struct ata_port *ap = ata_shost_to_port(shost);
 271        if (ap->ops->em_store && (ap->flags & ATA_FLAG_EM))
 272                return ap->ops->em_store(ap, buf, count);
 273        return -EINVAL;
 274}
 275
 276static ssize_t
 277ata_scsi_em_message_show(struct device *dev, struct device_attribute *attr,
 278                         char *buf)
 279{
 280        struct Scsi_Host *shost = class_to_shost(dev);
 281        struct ata_port *ap = ata_shost_to_port(shost);
 282
 283        if (ap->ops->em_show && (ap->flags & ATA_FLAG_EM))
 284                return ap->ops->em_show(ap, buf);
 285        return -EINVAL;
 286}
 287DEVICE_ATTR(em_message, S_IRUGO | S_IWUSR,
 288                ata_scsi_em_message_show, ata_scsi_em_message_store);
 289EXPORT_SYMBOL_GPL(dev_attr_em_message);
 290
 291static ssize_t
 292ata_scsi_em_message_type_show(struct device *dev, struct device_attribute *attr,
 293                              char *buf)
 294{
 295        struct Scsi_Host *shost = class_to_shost(dev);
 296        struct ata_port *ap = ata_shost_to_port(shost);
 297
 298        return snprintf(buf, 23, "%d\n", ap->em_message_type);
 299}
 300DEVICE_ATTR(em_message_type, S_IRUGO,
 301                  ata_scsi_em_message_type_show, NULL);
 302EXPORT_SYMBOL_GPL(dev_attr_em_message_type);
 303
 304static ssize_t
 305ata_scsi_activity_show(struct device *dev, struct device_attribute *attr,
 306                char *buf)
 307{
 308        struct scsi_device *sdev = to_scsi_device(dev);
 309        struct ata_port *ap = ata_shost_to_port(sdev->host);
 310        struct ata_device *atadev = ata_scsi_find_dev(ap, sdev);
 311
 312        if (atadev && ap->ops->sw_activity_show &&
 313            (ap->flags & ATA_FLAG_SW_ACTIVITY))
 314                return ap->ops->sw_activity_show(atadev, buf);
 315        return -EINVAL;
 316}
 317
 318static ssize_t
 319ata_scsi_activity_store(struct device *dev, struct device_attribute *attr,
 320        const char *buf, size_t count)
 321{
 322        struct scsi_device *sdev = to_scsi_device(dev);
 323        struct ata_port *ap = ata_shost_to_port(sdev->host);
 324        struct ata_device *atadev = ata_scsi_find_dev(ap, sdev);
 325        enum sw_activity val;
 326        int rc;
 327
 328        if (atadev && ap->ops->sw_activity_store &&
 329            (ap->flags & ATA_FLAG_SW_ACTIVITY)) {
 330                val = simple_strtoul(buf, NULL, 0);
 331                switch (val) {
 332                case OFF: case BLINK_ON: case BLINK_OFF:
 333                        rc = ap->ops->sw_activity_store(atadev, val);
 334                        if (!rc)
 335                                return count;
 336                        else
 337                                return rc;
 338                }
 339        }
 340        return -EINVAL;
 341}
 342DEVICE_ATTR(sw_activity, S_IWUSR | S_IRUGO, ata_scsi_activity_show,
 343                        ata_scsi_activity_store);
 344EXPORT_SYMBOL_GPL(dev_attr_sw_activity);
 345
 346struct device_attribute *ata_common_sdev_attrs[] = {
 347        &dev_attr_unload_heads,
 348        NULL
 349};
 350EXPORT_SYMBOL_GPL(ata_common_sdev_attrs);
 351
 352static void ata_scsi_invalid_field(struct scsi_cmnd *cmd)
 353{
 354        ata_scsi_set_sense(cmd, ILLEGAL_REQUEST, 0x24, 0x0);
 355        /* "Invalid field in cbd" */
 356        cmd->scsi_done(cmd);
 357}
 358
 359/**
 360 *      ata_std_bios_param - generic bios head/sector/cylinder calculator used by sd.
 361 *      @sdev: SCSI device for which BIOS geometry is to be determined
 362 *      @bdev: block device associated with @sdev
 363 *      @capacity: capacity of SCSI device
 364 *      @geom: location to which geometry will be output
 365 *
 366 *      Generic bios head/sector/cylinder calculator
 367 *      used by sd. Most BIOSes nowadays expect a XXX/255/16  (CHS)
 368 *      mapping. Some situations may arise where the disk is not
 369 *      bootable if this is not used.
 370 *
 371 *      LOCKING:
 372 *      Defined by the SCSI layer.  We don't really care.
 373 *
 374 *      RETURNS:
 375 *      Zero.
 376 */
 377int ata_std_bios_param(struct scsi_device *sdev, struct block_device *bdev,
 378                       sector_t capacity, int geom[])
 379{
 380        geom[0] = 255;
 381        geom[1] = 63;
 382        sector_div(capacity, 255*63);
 383        geom[2] = capacity;
 384
 385        return 0;
 386}
 387
 388/**
 389 *      ata_scsi_unlock_native_capacity - unlock native capacity
 390 *      @sdev: SCSI device to adjust device capacity for
 391 *
 392 *      This function is called if a partition on @sdev extends beyond
 393 *      the end of the device.  It requests EH to unlock HPA.
 394 *
 395 *      LOCKING:
 396 *      Defined by the SCSI layer.  Might sleep.
 397 */
 398void ata_scsi_unlock_native_capacity(struct scsi_device *sdev)
 399{
 400        struct ata_port *ap = ata_shost_to_port(sdev->host);
 401        struct ata_device *dev;
 402        unsigned long flags;
 403
 404        spin_lock_irqsave(ap->lock, flags);
 405
 406        dev = ata_scsi_find_dev(ap, sdev);
 407        if (dev && dev->n_sectors < dev->n_native_sectors) {
 408                dev->flags |= ATA_DFLAG_UNLOCK_HPA;
 409                dev->link->eh_info.action |= ATA_EH_RESET;
 410                ata_port_schedule_eh(ap);
 411        }
 412
 413        spin_unlock_irqrestore(ap->lock, flags);
 414        ata_port_wait_eh(ap);
 415}
 416
 417/**
 418 *      ata_get_identity - Handler for HDIO_GET_IDENTITY ioctl
 419 *      @ap: target port
 420 *      @sdev: SCSI device to get identify data for
 421 *      @arg: User buffer area for identify data
 422 *
 423 *      LOCKING:
 424 *      Defined by the SCSI layer.  We don't really care.
 425 *
 426 *      RETURNS:
 427 *      Zero on success, negative errno on error.
 428 */
 429static int ata_get_identity(struct ata_port *ap, struct scsi_device *sdev,
 430                            void __user *arg)
 431{
 432        struct ata_device *dev = ata_scsi_find_dev(ap, sdev);
 433        u16 __user *dst = arg;
 434        char buf[40];
 435
 436        if (!dev)
 437                return -ENOMSG;
 438
 439        if (copy_to_user(dst, dev->id, ATA_ID_WORDS * sizeof(u16)))
 440                return -EFAULT;
 441
 442        ata_id_string(dev->id, buf, ATA_ID_PROD, ATA_ID_PROD_LEN);
 443        if (copy_to_user(dst + ATA_ID_PROD, buf, ATA_ID_PROD_LEN))
 444                return -EFAULT;
 445
 446        ata_id_string(dev->id, buf, ATA_ID_FW_REV, ATA_ID_FW_REV_LEN);
 447        if (copy_to_user(dst + ATA_ID_FW_REV, buf, ATA_ID_FW_REV_LEN))
 448                return -EFAULT;
 449
 450        ata_id_string(dev->id, buf, ATA_ID_SERNO, ATA_ID_SERNO_LEN);
 451        if (copy_to_user(dst + ATA_ID_SERNO, buf, ATA_ID_SERNO_LEN))
 452                return -EFAULT;
 453
 454        return 0;
 455}
 456
 457/**
 458 *      ata_cmd_ioctl - Handler for HDIO_DRIVE_CMD ioctl
 459 *      @scsidev: Device to which we are issuing command
 460 *      @arg: User provided data for issuing command
 461 *
 462 *      LOCKING:
 463 *      Defined by the SCSI layer.  We don't really care.
 464 *
 465 *      RETURNS:
 466 *      Zero on success, negative errno on error.
 467 */
 468int ata_cmd_ioctl(struct scsi_device *scsidev, void __user *arg)
 469{
 470        int rc = 0;
 471        u8 scsi_cmd[MAX_COMMAND_SIZE];
 472        u8 args[4], *argbuf = NULL, *sensebuf = NULL;
 473        int argsize = 0;
 474        enum dma_data_direction data_dir;
 475        int cmd_result;
 476
 477        if (arg == NULL)
 478                return -EINVAL;
 479
 480        if (copy_from_user(args, arg, sizeof(args)))
 481                return -EFAULT;
 482
 483        sensebuf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO);
 484        if (!sensebuf)
 485                return -ENOMEM;
 486
 487        memset(scsi_cmd, 0, sizeof(scsi_cmd));
 488
 489        if (args[3]) {
 490                argsize = ATA_SECT_SIZE * args[3];
 491                argbuf = kmalloc(argsize, GFP_KERNEL);
 492                if (argbuf == NULL) {
 493                        rc = -ENOMEM;
 494                        goto error;
 495                }
 496
 497                scsi_cmd[1]  = (4 << 1); /* PIO Data-in */
 498                scsi_cmd[2]  = 0x0e;     /* no off.line or cc, read from dev,
 499                                            block count in sector count field */
 500                data_dir = DMA_FROM_DEVICE;
 501        } else {
 502                scsi_cmd[1]  = (3 << 1); /* Non-data */
 503                scsi_cmd[2]  = 0x20;     /* cc but no off.line or data xfer */
 504                data_dir = DMA_NONE;
 505        }
 506
 507        scsi_cmd[0] = ATA_16;
 508
 509        scsi_cmd[4] = args[2];
 510        if (args[0] == ATA_CMD_SMART) { /* hack -- ide driver does this too */
 511                scsi_cmd[6]  = args[3];
 512                scsi_cmd[8]  = args[1];
 513                scsi_cmd[10] = 0x4f;
 514                scsi_cmd[12] = 0xc2;
 515        } else {
 516                scsi_cmd[6]  = args[1];
 517        }
 518        scsi_cmd[14] = args[0];
 519
 520        /* Good values for timeout and retries?  Values below
 521           from scsi_ioctl_send_command() for default case... */
 522        cmd_result = scsi_execute(scsidev, scsi_cmd, data_dir, argbuf, argsize,
 523                                  sensebuf, (10*HZ), 5, 0, NULL);
 524
 525        if (driver_byte(cmd_result) == DRIVER_SENSE) {/* sense data available */
 526                u8 *desc = sensebuf + 8;
 527                cmd_result &= ~(0xFF<<24); /* DRIVER_SENSE is not an error */
 528
 529                /* If we set cc then ATA pass-through will cause a
 530                 * check condition even if no error. Filter that. */
 531                if (cmd_result & SAM_STAT_CHECK_CONDITION) {
 532                        struct scsi_sense_hdr sshdr;
 533                        scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
 534                                             &sshdr);
 535                        if (sshdr.sense_key == 0 &&
 536                            sshdr.asc == 0 && sshdr.ascq == 0)
 537                                cmd_result &= ~SAM_STAT_CHECK_CONDITION;
 538                }
 539
 540                /* Send userspace a few ATA registers (same as drivers/ide) */
 541                if (sensebuf[0] == 0x72 &&      /* format is "descriptor" */
 542                    desc[0] == 0x09) {          /* code is "ATA Descriptor" */
 543                        args[0] = desc[13];     /* status */
 544                        args[1] = desc[3];      /* error */
 545                        args[2] = desc[5];      /* sector count (0:7) */
 546                        if (copy_to_user(arg, args, sizeof(args)))
 547                                rc = -EFAULT;
 548                }
 549        }
 550
 551
 552        if (cmd_result) {
 553                rc = -EIO;
 554                goto error;
 555        }
 556
 557        if ((argbuf)
 558         && copy_to_user(arg + sizeof(args), argbuf, argsize))
 559                rc = -EFAULT;
 560error:
 561        kfree(sensebuf);
 562        kfree(argbuf);
 563        return rc;
 564}
 565
 566/**
 567 *      ata_task_ioctl - Handler for HDIO_DRIVE_TASK ioctl
 568 *      @scsidev: Device to which we are issuing command
 569 *      @arg: User provided data for issuing command
 570 *
 571 *      LOCKING:
 572 *      Defined by the SCSI layer.  We don't really care.
 573 *
 574 *      RETURNS:
 575 *      Zero on success, negative errno on error.
 576 */
 577int ata_task_ioctl(struct scsi_device *scsidev, void __user *arg)
 578{
 579        int rc = 0;
 580        u8 scsi_cmd[MAX_COMMAND_SIZE];
 581        u8 args[7], *sensebuf = NULL;
 582        int cmd_result;
 583
 584        if (arg == NULL)
 585                return -EINVAL;
 586
 587        if (copy_from_user(args, arg, sizeof(args)))
 588                return -EFAULT;
 589
 590        sensebuf = kzalloc(SCSI_SENSE_BUFFERSIZE, GFP_NOIO);
 591        if (!sensebuf)
 592                return -ENOMEM;
 593
 594        memset(scsi_cmd, 0, sizeof(scsi_cmd));
 595        scsi_cmd[0]  = ATA_16;
 596        scsi_cmd[1]  = (3 << 1); /* Non-data */
 597        scsi_cmd[2]  = 0x20;     /* cc but no off.line or data xfer */
 598        scsi_cmd[4]  = args[1];
 599        scsi_cmd[6]  = args[2];
 600        scsi_cmd[8]  = args[3];
 601        scsi_cmd[10] = args[4];
 602        scsi_cmd[12] = args[5];
 603        scsi_cmd[13] = args[6] & 0x4f;
 604        scsi_cmd[14] = args[0];
 605
 606        /* Good values for timeout and retries?  Values below
 607           from scsi_ioctl_send_command() for default case... */
 608        cmd_result = scsi_execute(scsidev, scsi_cmd, DMA_NONE, NULL, 0,
 609                                sensebuf, (10*HZ), 5, 0, NULL);
 610
 611        if (driver_byte(cmd_result) == DRIVER_SENSE) {/* sense data available */
 612                u8 *desc = sensebuf + 8;
 613                cmd_result &= ~(0xFF<<24); /* DRIVER_SENSE is not an error */
 614
 615                /* If we set cc then ATA pass-through will cause a
 616                 * check condition even if no error. Filter that. */
 617                if (cmd_result & SAM_STAT_CHECK_CONDITION) {
 618                        struct scsi_sense_hdr sshdr;
 619                        scsi_normalize_sense(sensebuf, SCSI_SENSE_BUFFERSIZE,
 620                                                &sshdr);
 621                        if (sshdr.sense_key == 0 &&
 622                                sshdr.asc == 0 && sshdr.ascq == 0)
 623                                cmd_result &= ~SAM_STAT_CHECK_CONDITION;
 624                }
 625
 626                /* Send userspace ATA registers */
 627                if (sensebuf[0] == 0x72 &&      /* format is "descriptor" */
 628                                desc[0] == 0x09) {/* code is "ATA Descriptor" */
 629                        args[0] = desc[13];     /* status */
 630                        args[1] = desc[3];      /* error */
 631                        args[2] = desc[5];      /* sector count (0:7) */
 632                        args[3] = desc[7];      /* lbal */
 633                        args[4] = desc[9];      /* lbam */
 634                        args[5] = desc[11];     /* lbah */
 635                        args[6] = desc[12];     /* select */
 636                        if (copy_to_user(arg, args, sizeof(args)))
 637                                rc = -EFAULT;
 638                }
 639        }
 640
 641        if (cmd_result) {
 642                rc = -EIO;
 643                goto error;
 644        }
 645
 646 error:
 647        kfree(sensebuf);
 648        return rc;
 649}
 650
 651static int ata_ioc32(struct ata_port *ap)
 652{
 653        if (ap->flags & ATA_FLAG_PIO_DMA)
 654                return 1;
 655        if (ap->pflags & ATA_PFLAG_PIO32)
 656                return 1;
 657        return 0;
 658}
 659
 660int ata_sas_scsi_ioctl(struct ata_port *ap, struct scsi_device *scsidev,
 661                     int cmd, void __user *arg)
 662{
 663        int val = -EINVAL, rc = -EINVAL;
 664        unsigned long flags;
 665
 666        switch (cmd) {
 667        case ATA_IOC_GET_IO32:
 668                spin_lock_irqsave(ap->lock, flags);
 669                val = ata_ioc32(ap);
 670                spin_unlock_irqrestore(ap->lock, flags);
 671                if (copy_to_user(arg, &val, 1))
 672                        return -EFAULT;
 673                return 0;
 674
 675        case ATA_IOC_SET_IO32:
 676                val = (unsigned long) arg;
 677                rc = 0;
 678                spin_lock_irqsave(ap->lock, flags);
 679                if (ap->pflags & ATA_PFLAG_PIO32CHANGE) {
 680                        if (val)
 681                                ap->pflags |= ATA_PFLAG_PIO32;
 682                        else
 683                                ap->pflags &= ~ATA_PFLAG_PIO32;
 684                } else {
 685                        if (val != ata_ioc32(ap))
 686                                rc = -EINVAL;
 687                }
 688                spin_unlock_irqrestore(ap->lock, flags);
 689                return rc;
 690
 691        case HDIO_GET_IDENTITY:
 692                return ata_get_identity(ap, scsidev, arg);
 693
 694        case HDIO_DRIVE_CMD:
 695                if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
 696                        return -EACCES;
 697                return ata_cmd_ioctl(scsidev, arg);
 698
 699        case HDIO_DRIVE_TASK:
 700                if (!capable(CAP_SYS_ADMIN) || !capable(CAP_SYS_RAWIO))
 701                        return -EACCES;
 702                return ata_task_ioctl(scsidev, arg);
 703
 704        default:
 705                rc = -ENOTTY;
 706                break;
 707        }
 708
 709        return rc;
 710}
 711EXPORT_SYMBOL_GPL(ata_sas_scsi_ioctl);
 712
 713int ata_scsi_ioctl(struct scsi_device *scsidev, int cmd, void __user *arg)
 714{
 715        return ata_sas_scsi_ioctl(ata_shost_to_port(scsidev->host),
 716                                scsidev, cmd, arg);
 717}
 718EXPORT_SYMBOL_GPL(ata_scsi_ioctl);
 719
 720/**
 721 *      ata_scsi_qc_new - acquire new ata_queued_cmd reference
 722 *      @dev: ATA device to which the new command is attached
 723 *      @cmd: SCSI command that originated this ATA command
 724 *
 725 *      Obtain a reference to an unused ata_queued_cmd structure,
 726 *      which is the basic libata structure representing a single
 727 *      ATA command sent to the hardware.
 728 *
 729 *      If a command was available, fill in the SCSI-specific
 730 *      portions of the structure with information on the
 731 *      current command.
 732 *
 733 *      LOCKING:
 734 *      spin_lock_irqsave(host lock)
 735 *
 736 *      RETURNS:
 737 *      Command allocated, or %NULL if none available.
 738 */
 739static struct ata_queued_cmd *ata_scsi_qc_new(struct ata_device *dev,
 740                                              struct scsi_cmnd *cmd)
 741{
 742        struct ata_queued_cmd *qc;
 743
 744        qc = ata_qc_new_init(dev);
 745        if (qc) {
 746                qc->scsicmd = cmd;
 747                qc->scsidone = cmd->scsi_done;
 748
 749                qc->sg = scsi_sglist(cmd);
 750                qc->n_elem = scsi_sg_count(cmd);
 751        } else {
 752                cmd->result = (DID_OK << 16) | (QUEUE_FULL << 1);
 753                cmd->scsi_done(cmd);
 754        }
 755
 756        return qc;
 757}
 758
 759static void ata_qc_set_pc_nbytes(struct ata_queued_cmd *qc)
 760{
 761        struct scsi_cmnd *scmd = qc->scsicmd;
 762
 763        qc->extrabytes = scmd->request->extra_len;
 764        qc->nbytes = scsi_bufflen(scmd) + qc->extrabytes;
 765}
 766
 767/**
 768 *      ata_dump_status - user friendly display of error info
 769 *      @id: id of the port in question
 770 *      @tf: ptr to filled out taskfile
 771 *
 772 *      Decode and dump the ATA error/status registers for the user so
 773 *      that they have some idea what really happened at the non
 774 *      make-believe layer.
 775 *
 776 *      LOCKING:
 777 *      inherited from caller
 778 */
 779static void ata_dump_status(unsigned id, struct ata_taskfile *tf)
 780{
 781        u8 stat = tf->command, err = tf->feature;
 782
 783        printk(KERN_WARNING "ata%u: status=0x%02x { ", id, stat);
 784        if (stat & ATA_BUSY) {
 785                printk("Busy }\n");     /* Data is not valid in this case */
 786        } else {
 787                if (stat & 0x40)        printk("DriveReady ");
 788                if (stat & 0x20)        printk("DeviceFault ");
 789                if (stat & 0x10)        printk("SeekComplete ");
 790                if (stat & 0x08)        printk("DataRequest ");
 791                if (stat & 0x04)        printk("CorrectedError ");
 792                if (stat & 0x02)        printk("Index ");
 793                if (stat & 0x01)        printk("Error ");
 794                printk("}\n");
 795
 796                if (err) {
 797                        printk(KERN_WARNING "ata%u: error=0x%02x { ", id, err);
 798                        if (err & 0x04)         printk("DriveStatusError ");
 799                        if (err & 0x80) {
 800                                if (err & 0x04) printk("BadCRC ");
 801                                else            printk("Sector ");
 802                        }
 803                        if (err & 0x40)         printk("UncorrectableError ");
 804                        if (err & 0x10)         printk("SectorIdNotFound ");
 805                        if (err & 0x02)         printk("TrackZeroNotFound ");
 806                        if (err & 0x01)         printk("AddrMarkNotFound ");
 807                        printk("}\n");
 808                }
 809        }
 810}
 811
 812/**
 813 *      ata_to_sense_error - convert ATA error to SCSI error
 814 *      @id: ATA device number
 815 *      @drv_stat: value contained in ATA status register
 816 *      @drv_err: value contained in ATA error register
 817 *      @sk: the sense key we'll fill out
 818 *      @asc: the additional sense code we'll fill out
 819 *      @ascq: the additional sense code qualifier we'll fill out
 820 *      @verbose: be verbose
 821 *
 822 *      Converts an ATA error into a SCSI error.  Fill out pointers to
 823 *      SK, ASC, and ASCQ bytes for later use in fixed or descriptor
 824 *      format sense blocks.
 825 *
 826 *      LOCKING:
 827 *      spin_lock_irqsave(host lock)
 828 */
 829static void ata_to_sense_error(unsigned id, u8 drv_stat, u8 drv_err, u8 *sk,
 830                               u8 *asc, u8 *ascq, int verbose)
 831{
 832        int i;
 833
 834        /* Based on the 3ware driver translation table */
 835        static const unsigned char sense_table[][4] = {
 836                /* BBD|ECC|ID|MAR */
 837                {0xd1,          ABORTED_COMMAND, 0x00, 0x00},   // Device busy                  Aborted command
 838                /* BBD|ECC|ID */
 839                {0xd0,          ABORTED_COMMAND, 0x00, 0x00},   // Device busy                  Aborted command
 840                /* ECC|MC|MARK */
 841                {0x61,          HARDWARE_ERROR, 0x00, 0x00},    // Device fault                 Hardware error
 842                /* ICRC|ABRT */         /* NB: ICRC & !ABRT is BBD */
 843                {0x84,          ABORTED_COMMAND, 0x47, 0x00},   // Data CRC error               SCSI parity error
 844                /* MC|ID|ABRT|TRK0|MARK */
 845                {0x37,          NOT_READY, 0x04, 0x00},         // Unit offline                 Not ready
 846                /* MCR|MARK */
 847                {0x09,          NOT_READY, 0x04, 0x00},         // Unrecovered disk error       Not ready
 848                /*  Bad address mark */
 849                {0x01,          MEDIUM_ERROR, 0x13, 0x00},      // Address mark not found       Address mark not found for data field
 850                /* TRK0 */
 851                {0x02,          HARDWARE_ERROR, 0x00, 0x00},    // Track 0 not found              Hardware error
 852                /* Abort & !ICRC */
 853                {0x04,          ABORTED_COMMAND, 0x00, 0x00},   // Aborted command              Aborted command
 854                /* Media change request */
 855                {0x08,          NOT_READY, 0x04, 0x00},         // Media change request   FIXME: faking offline
 856                /* SRV */
 857                {0x10,          ABORTED_COMMAND, 0x14, 0x00},   // ID not found                 Recorded entity not found
 858                /* Media change */
 859                {0x08,          NOT_READY, 0x04, 0x00},         // Media change           FIXME: faking offline
 860                /* ECC */
 861                {0x40,          MEDIUM_ERROR, 0x11, 0x04},      // Uncorrectable ECC error      Unrecovered read error
 862                /* BBD - block marked bad */
 863                {0x80,          MEDIUM_ERROR, 0x11, 0x04},      // Block marked bad               Medium error, unrecovered read error
 864                {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
 865        };
 866        static const unsigned char stat_table[][4] = {
 867                /* Must be first because BUSY means no other bits valid */
 868                {0x80,          ABORTED_COMMAND, 0x47, 0x00},   // Busy, fake parity for now
 869                {0x20,          HARDWARE_ERROR,  0x00, 0x00},   // Device fault
 870                {0x08,          ABORTED_COMMAND, 0x47, 0x00},   // Timed out in xfer, fake parity for now
 871                {0x04,          RECOVERED_ERROR, 0x11, 0x00},   // Recovered ECC error    Medium error, recovered
 872                {0xFF, 0xFF, 0xFF, 0xFF}, // END mark
 873        };
 874
 875        /*
 876         *      Is this an error we can process/parse
 877         */
 878        if (drv_stat & ATA_BUSY) {
 879                drv_err = 0;    /* Ignore the err bits, they're invalid */
 880        }
 881
 882        if (drv_err) {
 883                /* Look for drv_err */
 884                for (i = 0; sense_table[i][0] != 0xFF; i++) {
 885                        /* Look for best matches first */
 886                        if ((sense_table[i][0] & drv_err) ==
 887                            sense_table[i][0]) {
 888                                *sk = sense_table[i][1];
 889                                *asc = sense_table[i][2];
 890                                *ascq = sense_table[i][3];
 891                                goto translate_done;
 892                        }
 893                }
 894                /* No immediate match */
 895                if (verbose)
 896                        printk(KERN_WARNING "ata%u: no sense translation for "
 897                               "error 0x%02x\n", id, drv_err);
 898        }
 899
 900        /* Fall back to interpreting status bits */
 901        for (i = 0; stat_table[i][0] != 0xFF; i++) {
 902                if (stat_table[i][0] & drv_stat) {
 903                        *sk = stat_table[i][1];
 904                        *asc = stat_table[i][2];
 905                        *ascq = stat_table[i][3];
 906                        goto translate_done;
 907                }
 908        }
 909        /* No error?  Undecoded? */
 910        if (verbose)
 911                printk(KERN_WARNING "ata%u: no sense translation for "
 912                       "status: 0x%02x\n", id, drv_stat);
 913
 914        /* We need a sensible error return here, which is tricky, and one
 915           that won't cause people to do things like return a disk wrongly */
 916        *sk = ABORTED_COMMAND;
 917        *asc = 0x00;
 918        *ascq = 0x00;
 919
 920 translate_done:
 921        if (verbose)
 922                printk(KERN_ERR "ata%u: translated ATA stat/err 0x%02x/%02x "
 923                       "to SCSI SK/ASC/ASCQ 0x%x/%02x/%02x\n",
 924                       id, drv_stat, drv_err, *sk, *asc, *ascq);
 925        return;
 926}
 927
 928/*
 929 *      ata_gen_passthru_sense - Generate check condition sense block.
 930 *      @qc: Command that completed.
 931 *
 932 *      This function is specific to the ATA descriptor format sense
 933 *      block specified for the ATA pass through commands.  Regardless
 934 *      of whether the command errored or not, return a sense
 935 *      block. Copy all controller registers into the sense
 936 *      block. Clear sense key, ASC & ASCQ if there is no error.
 937 *
 938 *      LOCKING:
 939 *      None.
 940 */
 941static void ata_gen_passthru_sense(struct ata_queued_cmd *qc)
 942{
 943        struct scsi_cmnd *cmd = qc->scsicmd;
 944        struct ata_taskfile *tf = &qc->result_tf;
 945        unsigned char *sb = cmd->sense_buffer;
 946        unsigned char *desc = sb + 8;
 947        int verbose = qc->ap->ops->error_handler == NULL;
 948
 949        memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
 950
 951        cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
 952
 953        /*
 954         * Use ata_to_sense_error() to map status register bits
 955         * onto sense key, asc & ascq.
 956         */
 957        if (qc->err_mask ||
 958            tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {
 959                ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature,
 960                                   &sb[1], &sb[2], &sb[3], verbose);
 961                sb[1] &= 0x0f;
 962        }
 963
 964        /*
 965         * Sense data is current and format is descriptor.
 966         */
 967        sb[0] = 0x72;
 968
 969        desc[0] = 0x09;
 970
 971        /* set length of additional sense data */
 972        sb[7] = 14;
 973        desc[1] = 12;
 974
 975        /*
 976         * Copy registers into sense buffer.
 977         */
 978        desc[2] = 0x00;
 979        desc[3] = tf->feature;  /* == error reg */
 980        desc[5] = tf->nsect;
 981        desc[7] = tf->lbal;
 982        desc[9] = tf->lbam;
 983        desc[11] = tf->lbah;
 984        desc[12] = tf->device;
 985        desc[13] = tf->command; /* == status reg */
 986
 987        /*
 988         * Fill in Extend bit, and the high order bytes
 989         * if applicable.
 990         */
 991        if (tf->flags & ATA_TFLAG_LBA48) {
 992                desc[2] |= 0x01;
 993                desc[4] = tf->hob_nsect;
 994                desc[6] = tf->hob_lbal;
 995                desc[8] = tf->hob_lbam;
 996                desc[10] = tf->hob_lbah;
 997        }
 998}
 999
1000/**
1001 *      ata_gen_ata_sense - generate a SCSI fixed sense block
1002 *      @qc: Command that we are erroring out
1003 *
1004 *      Generate sense block for a failed ATA command @qc.  Descriptor
1005 *      format is used to accommodate LBA48 block address.
1006 *
1007 *      LOCKING:
1008 *      None.
1009 */
1010static void ata_gen_ata_sense(struct ata_queued_cmd *qc)
1011{
1012        struct ata_device *dev = qc->dev;
1013        struct scsi_cmnd *cmd = qc->scsicmd;
1014        struct ata_taskfile *tf = &qc->result_tf;
1015        unsigned char *sb = cmd->sense_buffer;
1016        unsigned char *desc = sb + 8;
1017        int verbose = qc->ap->ops->error_handler == NULL;
1018        u64 block;
1019
1020        memset(sb, 0, SCSI_SENSE_BUFFERSIZE);
1021
1022        cmd->result = (DRIVER_SENSE << 24) | SAM_STAT_CHECK_CONDITION;
1023
1024        /* sense data is current and format is descriptor */
1025        sb[0] = 0x72;
1026
1027        /* Use ata_to_sense_error() to map status register bits
1028         * onto sense key, asc & ascq.
1029         */
1030        if (qc->err_mask ||
1031            tf->command & (ATA_BUSY | ATA_DF | ATA_ERR | ATA_DRQ)) {
1032                ata_to_sense_error(qc->ap->print_id, tf->command, tf->feature,
1033                                   &sb[1], &sb[2], &sb[3], verbose);
1034                sb[1] &= 0x0f;
1035        }
1036
1037        block = ata_tf_read_block(&qc->result_tf, dev);
1038
1039        /* information sense data descriptor */
1040        sb[7] = 12;
1041        desc[0] = 0x00;
1042        desc[1] = 10;
1043
1044        desc[2] |= 0x80;        /* valid */
1045        desc[6] = block >> 40;
1046        desc[7] = block >> 32;
1047        desc[8] = block >> 24;
1048        desc[9] = block >> 16;
1049        desc[10] = block >> 8;
1050        desc[11] = block;
1051}
1052
1053static void ata_scsi_sdev_config(struct scsi_device *sdev)
1054{
1055        sdev->use_10_for_rw = 1;
1056        sdev->use_10_for_ms = 1;
1057        sdev->no_report_opcodes = 1;
1058        sdev->no_write_same = 1;
1059
1060        /* Schedule policy is determined by ->qc_defer() callback and
1061         * it needs to see every deferred qc.  Set dev_blocked to 1 to
1062         * prevent SCSI midlayer from automatically deferring
1063         * requests.
1064         */
1065        sdev->max_device_blocked = 1;
1066}
1067
1068/**
1069 *      atapi_drain_needed - Check whether data transfer may overflow
1070 *      @rq: request to be checked
1071 *
1072 *      ATAPI commands which transfer variable length data to host
1073 *      might overflow due to application error or hardare bug.  This
1074 *      function checks whether overflow should be drained and ignored
1075 *      for @request.
1076 *
1077 *      LOCKING:
1078 *      None.
1079 *
1080 *      RETURNS:
1081 *      1 if ; otherwise, 0.
1082 */
1083static int atapi_drain_needed(struct request *rq)
1084{
1085        if (likely(rq->cmd_type != REQ_TYPE_BLOCK_PC))
1086                return 0;
1087
1088        if (!blk_rq_bytes(rq) || (rq->cmd_flags & REQ_WRITE))
1089                return 0;
1090
1091        return atapi_cmd_type(rq->cmd[0]) == ATAPI_MISC;
1092}
1093
1094static int ata_scsi_dev_config(struct scsi_device *sdev,
1095                               struct ata_device *dev)
1096{
1097        struct request_queue *q = sdev->request_queue;
1098
1099        if (!ata_id_has_unload(dev->id))
1100                dev->flags |= ATA_DFLAG_NO_UNLOAD;
1101
1102        /* configure max sectors */
1103        blk_queue_max_hw_sectors(q, dev->max_sectors);
1104
1105        if (dev->class == ATA_DEV_ATAPI) {
1106                void *buf;
1107
1108                sdev->sector_size = ATA_SECT_SIZE;
1109
1110                /* set DMA padding */
1111                blk_queue_update_dma_pad(q, ATA_DMA_PAD_SZ - 1);
1112
1113                /* configure draining */
1114                buf = kmalloc(ATAPI_MAX_DRAIN, q->bounce_gfp | GFP_KERNEL);
1115                if (!buf) {
1116                        ata_dev_err(dev, "drain buffer allocation failed\n");
1117                        return -ENOMEM;
1118                }
1119
1120                blk_queue_dma_drain(q, atapi_drain_needed, buf, ATAPI_MAX_DRAIN);
1121        } else {
1122                sdev->sector_size = ata_id_logical_sector_size(dev->id);
1123                sdev->manage_start_stop = 1;
1124        }
1125
1126        /*
1127         * ata_pio_sectors() expects buffer for each sector to not cross
1128         * page boundary.  Enforce it by requiring buffers to be sector
1129         * aligned, which works iff sector_size is not larger than
1130         * PAGE_SIZE.  ATAPI devices also need the alignment as
1131         * IDENTIFY_PACKET is executed as ATA_PROT_PIO.
1132         */
1133        if (sdev->sector_size > PAGE_SIZE)
1134                ata_dev_warn(dev,
1135                        "sector_size=%u > PAGE_SIZE, PIO may malfunction\n",
1136                        sdev->sector_size);
1137
1138        blk_queue_update_dma_alignment(q, sdev->sector_size - 1);
1139
1140        if (dev->flags & ATA_DFLAG_AN)
1141                set_bit(SDEV_EVT_MEDIA_CHANGE, sdev->supported_events);
1142
1143        if (dev->flags & ATA_DFLAG_NCQ) {
1144                int depth;
1145
1146                depth = min(sdev->host->can_queue, ata_id_queue_depth(dev->id));
1147                depth = min(ATA_MAX_QUEUE - 1, depth);
1148                scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, depth);
1149        }
1150
1151        blk_queue_flush_queueable(q, false);
1152
1153        dev->sdev = sdev;
1154        return 0;
1155}
1156
1157/**
1158 *      ata_scsi_slave_config - Set SCSI device attributes
1159 *      @sdev: SCSI device to examine
1160 *
1161 *      This is called before we actually start reading
1162 *      and writing to the device, to configure certain
1163 *      SCSI mid-layer behaviors.
1164 *
1165 *      LOCKING:
1166 *      Defined by SCSI layer.  We don't really care.
1167 */
1168
1169int ata_scsi_slave_config(struct scsi_device *sdev)
1170{
1171        struct ata_port *ap = ata_shost_to_port(sdev->host);
1172        struct ata_device *dev = __ata_scsi_find_dev(ap, sdev);
1173        int rc = 0;
1174
1175        ata_scsi_sdev_config(sdev);
1176
1177        if (dev)
1178                rc = ata_scsi_dev_config(sdev, dev);
1179
1180        return rc;
1181}
1182
1183/**
1184 *      ata_scsi_slave_destroy - SCSI device is about to be destroyed
1185 *      @sdev: SCSI device to be destroyed
1186 *
1187 *      @sdev is about to be destroyed for hot/warm unplugging.  If
1188 *      this unplugging was initiated by libata as indicated by NULL
1189 *      dev->sdev, this function doesn't have to do anything.
1190 *      Otherwise, SCSI layer initiated warm-unplug is in progress.
1191 *      Clear dev->sdev, schedule the device for ATA detach and invoke
1192 *      EH.
1193 *
1194 *      LOCKING:
1195 *      Defined by SCSI layer.  We don't really care.
1196 */
1197void ata_scsi_slave_destroy(struct scsi_device *sdev)
1198{
1199        struct ata_port *ap = ata_shost_to_port(sdev->host);
1200        struct request_queue *q = sdev->request_queue;
1201        unsigned long flags;
1202        struct ata_device *dev;
1203
1204        if (!ap->ops->error_handler)
1205                return;
1206
1207        spin_lock_irqsave(ap->lock, flags);
1208        dev = __ata_scsi_find_dev(ap, sdev);
1209        if (dev && dev->sdev) {
1210                /* SCSI device already in CANCEL state, no need to offline it */
1211                dev->sdev = NULL;
1212                dev->flags |= ATA_DFLAG_DETACH;
1213                ata_port_schedule_eh(ap);
1214        }
1215        spin_unlock_irqrestore(ap->lock, flags);
1216
1217        kfree(q->dma_drain_buffer);
1218        q->dma_drain_buffer = NULL;
1219        q->dma_drain_size = 0;
1220}
1221
1222/**
1223 *      __ata_change_queue_depth - helper for ata_scsi_change_queue_depth
1224 *      @ap: ATA port to which the device change the queue depth
1225 *      @sdev: SCSI device to configure queue depth for
1226 *      @queue_depth: new queue depth
1227 *      @reason: calling context
1228 *
1229 *      libsas and libata have different approaches for associating a sdev to
1230 *      its ata_port.
1231 *
1232 */
1233int __ata_change_queue_depth(struct ata_port *ap, struct scsi_device *sdev,
1234                             int queue_depth, int reason)
1235{
1236        struct ata_device *dev;
1237        unsigned long flags;
1238
1239        if (reason != SCSI_QDEPTH_DEFAULT)
1240                return -EOPNOTSUPP;
1241
1242        if (queue_depth < 1 || queue_depth == sdev->queue_depth)
1243                return sdev->queue_depth;
1244
1245        dev = ata_scsi_find_dev(ap, sdev);
1246        if (!dev || !ata_dev_enabled(dev))
1247                return sdev->queue_depth;
1248
1249        /* NCQ enabled? */
1250        spin_lock_irqsave(ap->lock, flags);
1251        dev->flags &= ~ATA_DFLAG_NCQ_OFF;
1252        if (queue_depth == 1 || !ata_ncq_enabled(dev)) {
1253                dev->flags |= ATA_DFLAG_NCQ_OFF;
1254                queue_depth = 1;
1255        }
1256        spin_unlock_irqrestore(ap->lock, flags);
1257
1258        /* limit and apply queue depth */
1259        queue_depth = min(queue_depth, sdev->host->can_queue);
1260        queue_depth = min(queue_depth, ata_id_queue_depth(dev->id));
1261        queue_depth = min(queue_depth, ATA_MAX_QUEUE - 1);
1262
1263        if (sdev->queue_depth == queue_depth)
1264                return -EINVAL;
1265
1266        scsi_adjust_queue_depth(sdev, MSG_SIMPLE_TAG, queue_depth);
1267        return queue_depth;
1268}
1269
1270/**
1271 *      ata_scsi_change_queue_depth - SCSI callback for queue depth config
1272 *      @sdev: SCSI device to configure queue depth for
1273 *      @queue_depth: new queue depth
1274 *      @reason: calling context
1275 *
1276 *      This is libata standard hostt->change_queue_depth callback.
1277 *      SCSI will call into this callback when user tries to set queue
1278 *      depth via sysfs.
1279 *
1280 *      LOCKING:
1281 *      SCSI layer (we don't care)
1282 *
1283 *      RETURNS:
1284 *      Newly configured queue depth.
1285 */
1286int ata_scsi_change_queue_depth(struct scsi_device *sdev, int queue_depth,
1287                                int reason)
1288{
1289        struct ata_port *ap = ata_shost_to_port(sdev->host);
1290
1291        return __ata_change_queue_depth(ap, sdev, queue_depth, reason);
1292}
1293
1294/**
1295 *      ata_scsi_start_stop_xlat - Translate SCSI START STOP UNIT command
1296 *      @qc: Storage for translated ATA taskfile
1297 *
1298 *      Sets up an ATA taskfile to issue STANDBY (to stop) or READ VERIFY
1299 *      (to start). Perhaps these commands should be preceded by
1300 *      CHECK POWER MODE to see what power mode the device is already in.
1301 *      [See SAT revision 5 at www.t10.org]
1302 *
1303 *      LOCKING:
1304 *      spin_lock_irqsave(host lock)
1305 *
1306 *      RETURNS:
1307 *      Zero on success, non-zero on error.
1308 */
1309static unsigned int ata_scsi_start_stop_xlat(struct ata_queued_cmd *qc)
1310{
1311        struct scsi_cmnd *scmd = qc->scsicmd;
1312        struct ata_taskfile *tf = &qc->tf;
1313        const u8 *cdb = scmd->cmnd;
1314
1315        if (scmd->cmd_len < 5)
1316                goto invalid_fld;
1317
1318        tf->flags |= ATA_TFLAG_DEVICE | ATA_TFLAG_ISADDR;
1319        tf->protocol = ATA_PROT_NODATA;
1320        if (cdb[1] & 0x1) {
1321                ;       /* ignore IMMED bit, violates sat-r05 */
1322        }
1323        if (cdb[4] & 0x2)
1324                goto invalid_fld;       /* LOEJ bit set not supported */
1325        if (((cdb[4] >> 4) & 0xf) != 0)
1326                goto invalid_fld;       /* power conditions not supported */
1327
1328        if (cdb[4] & 0x1) {
1329                tf->nsect = 1;  /* 1 sector, lba=0 */
1330
1331                if (qc->dev->flags & ATA_DFLAG_LBA) {
1332                        tf->flags |= ATA_TFLAG_LBA;
1333
1334                        tf->lbah = 0x0;
1335                        tf->lbam = 0x0;
1336                        tf->lbal = 0x0;
1337                        tf->device |= ATA_LBA;
1338                } else {
1339                        /* CHS */
1340                        tf->lbal = 0x1; /* sect */
1341                        tf->lbam = 0x0; /* cyl low */
1342                        tf->lbah = 0x0; /* cyl high */
1343                }
1344
1345                tf->command = ATA_CMD_VERIFY;   /* READ VERIFY */
1346        } else {
1347                /* Some odd clown BIOSen issue spindown on power off (ACPI S4
1348                 * or S5) causing some drives to spin up and down again.
1349                 */
1350                if ((qc->ap->flags & ATA_FLAG_NO_POWEROFF_SPINDOWN) &&
1351                    system_state == SYSTEM_POWER_OFF)
1352                        goto skip;
1353
1354                if ((qc->ap->flags & ATA_FLAG_NO_HIBERNATE_SPINDOWN) &&
1355                     system_entering_hibernation())
1356                        goto skip;
1357
1358                /* Issue ATA STANDBY IMMEDIATE command */
1359                tf->command = ATA_CMD_STANDBYNOW1;
1360        }
1361
1362        /*
1363         * Standby and Idle condition timers could be implemented but that
1364         * would require libata to implement the Power condition mode page
1365         * and allow the user to change it. Changing mode pages requires
1366         * MODE SELECT to be implemented.
1367         */
1368
1369        return 0;
1370
1371 invalid_fld:
1372        ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
1373        /* "Invalid field in cbd" */
1374        return 1;
1375 skip:
1376        scmd->result = SAM_STAT_GOOD;
1377        return 1;
1378}
1379
1380
1381/**
1382 *      ata_scsi_flush_xlat - Translate SCSI SYNCHRONIZE CACHE command
1383 *      @qc: Storage for translated ATA taskfile
1384 *
1385 *      Sets up an ATA taskfile to issue FLUSH CACHE or
1386 *      FLUSH CACHE EXT.
1387 *
1388 *      LOCKING:
1389 *      spin_lock_irqsave(host lock)
1390 *
1391 *      RETURNS:
1392 *      Zero on success, non-zero on error.
1393 */
1394static unsigned int ata_scsi_flush_xlat(struct ata_queued_cmd *qc)
1395{
1396        struct ata_taskfile *tf = &qc->tf;
1397
1398        tf->flags |= ATA_TFLAG_DEVICE;
1399        tf->protocol = ATA_PROT_NODATA;
1400
1401        if (qc->dev->flags & ATA_DFLAG_FLUSH_EXT)
1402                tf->command = ATA_CMD_FLUSH_EXT;
1403        else
1404                tf->command = ATA_CMD_FLUSH;
1405
1406        /* flush is critical for IO integrity, consider it an IO command */
1407        qc->flags |= ATA_QCFLAG_IO;
1408
1409        return 0;
1410}
1411
1412/**
1413 *      scsi_6_lba_len - Get LBA and transfer length
1414 *      @cdb: SCSI command to translate
1415 *
1416 *      Calculate LBA and transfer length for 6-byte commands.
1417 *
1418 *      RETURNS:
1419 *      @plba: the LBA
1420 *      @plen: the transfer length
1421 */
1422static void scsi_6_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
1423{
1424        u64 lba = 0;
1425        u32 len;
1426
1427        VPRINTK("six-byte command\n");
1428
1429        lba |= ((u64)(cdb[1] & 0x1f)) << 16;
1430        lba |= ((u64)cdb[2]) << 8;
1431        lba |= ((u64)cdb[3]);
1432
1433        len = cdb[4];
1434
1435        *plba = lba;
1436        *plen = len;
1437}
1438
1439/**
1440 *      scsi_10_lba_len - Get LBA and transfer length
1441 *      @cdb: SCSI command to translate
1442 *
1443 *      Calculate LBA and transfer length for 10-byte commands.
1444 *
1445 *      RETURNS:
1446 *      @plba: the LBA
1447 *      @plen: the transfer length
1448 */
1449static void scsi_10_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
1450{
1451        u64 lba = 0;
1452        u32 len = 0;
1453
1454        VPRINTK("ten-byte command\n");
1455
1456        lba |= ((u64)cdb[2]) << 24;
1457        lba |= ((u64)cdb[3]) << 16;
1458        lba |= ((u64)cdb[4]) << 8;
1459        lba |= ((u64)cdb[5]);
1460
1461        len |= ((u32)cdb[7]) << 8;
1462        len |= ((u32)cdb[8]);
1463
1464        *plba = lba;
1465        *plen = len;
1466}
1467
1468/**
1469 *      scsi_16_lba_len - Get LBA and transfer length
1470 *      @cdb: SCSI command to translate
1471 *
1472 *      Calculate LBA and transfer length for 16-byte commands.
1473 *
1474 *      RETURNS:
1475 *      @plba: the LBA
1476 *      @plen: the transfer length
1477 */
1478static void scsi_16_lba_len(const u8 *cdb, u64 *plba, u32 *plen)
1479{
1480        u64 lba = 0;
1481        u32 len = 0;
1482
1483        VPRINTK("sixteen-byte command\n");
1484
1485        lba |= ((u64)cdb[2]) << 56;
1486        lba |= ((u64)cdb[3]) << 48;
1487        lba |= ((u64)cdb[4]) << 40;
1488        lba |= ((u64)cdb[5]) << 32;
1489        lba |= ((u64)cdb[6]) << 24;
1490        lba |= ((u64)cdb[7]) << 16;
1491        lba |= ((u64)cdb[8]) << 8;
1492        lba |= ((u64)cdb[9]);
1493
1494        len |= ((u32)cdb[10]) << 24;
1495        len |= ((u32)cdb[11]) << 16;
1496        len |= ((u32)cdb[12]) << 8;
1497        len |= ((u32)cdb[13]);
1498
1499        *plba = lba;
1500        *plen = len;
1501}
1502
1503/**
1504 *      ata_scsi_verify_xlat - Translate SCSI VERIFY command into an ATA one
1505 *      @qc: Storage for translated ATA taskfile
1506 *
1507 *      Converts SCSI VERIFY command to an ATA READ VERIFY command.
1508 *
1509 *      LOCKING:
1510 *      spin_lock_irqsave(host lock)
1511 *
1512 *      RETURNS:
1513 *      Zero on success, non-zero on error.
1514 */
1515static unsigned int ata_scsi_verify_xlat(struct ata_queued_cmd *qc)
1516{
1517        struct scsi_cmnd *scmd = qc->scsicmd;
1518        struct ata_taskfile *tf = &qc->tf;
1519        struct ata_device *dev = qc->dev;
1520        u64 dev_sectors = qc->dev->n_sectors;
1521        const u8 *cdb = scmd->cmnd;
1522        u64 block;
1523        u32 n_block;
1524
1525        tf->flags |= ATA_TFLAG_ISADDR | ATA_TFLAG_DEVICE;
1526        tf->protocol = ATA_PROT_NODATA;
1527
1528        if (cdb[0] == VERIFY) {
1529                if (scmd->cmd_len < 10)
1530                        goto invalid_fld;
1531                scsi_10_lba_len(cdb, &block, &n_block);
1532        } else if (cdb[0] == VERIFY_16) {
1533                if (scmd->cmd_len < 16)
1534                        goto invalid_fld;
1535                scsi_16_lba_len(cdb, &block, &n_block);
1536        } else
1537                goto invalid_fld;
1538
1539        if (!n_block)
1540                goto nothing_to_do;
1541        if (block >= dev_sectors)
1542                goto out_of_range;
1543        if ((block + n_block) > dev_sectors)
1544                goto out_of_range;
1545
1546        if (dev->flags & ATA_DFLAG_LBA) {
1547                tf->flags |= ATA_TFLAG_LBA;
1548
1549                if (lba_28_ok(block, n_block)) {
1550                        /* use LBA28 */
1551                        tf->command = ATA_CMD_VERIFY;
1552                        tf->device |= (block >> 24) & 0xf;
1553                } else if (lba_48_ok(block, n_block)) {
1554                        if (!(dev->flags & ATA_DFLAG_LBA48))
1555                                goto out_of_range;
1556
1557                        /* use LBA48 */
1558                        tf->flags |= ATA_TFLAG_LBA48;
1559                        tf->command = ATA_CMD_VERIFY_EXT;
1560
1561                        tf->hob_nsect = (n_block >> 8) & 0xff;
1562
1563                        tf->hob_lbah = (block >> 40) & 0xff;
1564                        tf->hob_lbam = (block >> 32) & 0xff;
1565                        tf->hob_lbal = (block >> 24) & 0xff;
1566                } else
1567                        /* request too large even for LBA48 */
1568                        goto out_of_range;
1569
1570                tf->nsect = n_block & 0xff;
1571
1572                tf->lbah = (block >> 16) & 0xff;
1573                tf->lbam = (block >> 8) & 0xff;
1574                tf->lbal = block & 0xff;
1575
1576                tf->device |= ATA_LBA;
1577        } else {
1578                /* CHS */
1579                u32 sect, head, cyl, track;
1580
1581                if (!lba_28_ok(block, n_block))
1582                        goto out_of_range;
1583
1584                /* Convert LBA to CHS */
1585                track = (u32)block / dev->sectors;
1586                cyl   = track / dev->heads;
1587                head  = track % dev->heads;
1588                sect  = (u32)block % dev->sectors + 1;
1589
1590                DPRINTK("block %u track %u cyl %u head %u sect %u\n",
1591                        (u32)block, track, cyl, head, sect);
1592
1593                /* Check whether the converted CHS can fit.
1594                   Cylinder: 0-65535
1595                   Head: 0-15
1596                   Sector: 1-255*/
1597                if ((cyl >> 16) || (head >> 4) || (sect >> 8) || (!sect))
1598                        goto out_of_range;
1599
1600                tf->command = ATA_CMD_VERIFY;
1601                tf->nsect = n_block & 0xff; /* Sector count 0 means 256 sectors */
1602                tf->lbal = sect;
1603                tf->lbam = cyl;
1604                tf->lbah = cyl >> 8;
1605                tf->device |= head;
1606        }
1607
1608        return 0;
1609
1610invalid_fld:
1611        ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x24, 0x0);
1612        /* "Invalid field in cbd" */
1613        return 1;
1614
1615out_of_range:
1616        ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0);
1617        /* "Logical Block Address out of range" */
1618        return 1;
1619
1620nothing_to_do:
1621        scmd->result = SAM_STAT_GOOD;
1622        return 1;
1623}
1624
1625/**
1626 *      ata_scsi_rw_xlat - Translate SCSI r/w command into an ATA one
1627 *      @qc: Storage for translated ATA taskfile
1628 *
1629 *      Converts any of six SCSI read/write commands into the
1630 *      ATA counterpart, including starting sector (LBA),
1631 *      sector count, and taking into account the device's LBA48
1632 *      support.
1633 *
1634 *      Commands %READ_6, %READ_10, %READ_16, %WRITE_6, %WRITE_10, and
1635 *      %WRITE_16 are currently supported.
1636 *
1637 *      LOCKING:
1638 *      spin_lock_irqsave(host lock)
1639 *
1640 *      RETURNS:
1641 *      Zero on success, non-zero on error.
1642 */
1643static unsigned int ata_scsi_rw_xlat(struct ata_queued_cmd *qc)
1644{
1645        struct scsi_cmnd *scmd = qc->scsicmd;
1646        const u8 *cdb = scmd->cmnd;
1647        unsigned int tf_flags = 0;
1648        u64 block;
1649        u32 n_block;
1650        int rc;
1651
1652        if (cdb[0] == WRITE_10 || cdb[0] == WRITE_6 || cdb[0] == WRITE_16)
1653                tf_flags |= ATA_TFLAG_WRITE;
1654
1655        /* Calculate the SCSI LBA, transfer length and FUA. */
1656        switch (cdb[0]) {
1657        case READ_10:
1658        case WRITE_10:
1659                if (unlikely(scmd->cmd_len < 10))
1660                        goto invalid_fld;
1661                scsi_10_lba_len(cdb, &block, &n_block);
1662                if (cdb[1] & (1 << 3))
1663                        tf_flags |= ATA_TFLAG_FUA;
1664                break;
1665        case READ_6:
1666        case WRITE_6:
1667                if (unlikely(scmd->cmd_len < 6))
1668                        goto invalid_fld;
1669                scsi_6_lba_len(cdb, &block, &n_block);
1670
1671                /* for 6-byte r/w commands, transfer length 0
1672                 * means 256 blocks of data, not 0 block.
1673                 */
1674                if (!n_block)
1675                        n_block = 256;
1676                break;
1677        case READ_16:
1678        case WRITE_16:
1679                if (unlikely(scmd->cmd_len < 16))
1680                        goto invalid_fld;
1681                scsi_16_lba_len(cdb, &block, &n_block);
1682                if (cdb[1] & (1 << 3))
1683                        tf_flags |= ATA_TFLAG_FUA;
1684                break;
1685        default:
1686                DPRINTK("no-byte command\n");
1687                goto invalid_fld;
1688        }
1689
1690        /* Check and compose ATA command */
1691        if (!n_block)
1692                /* For 10-byte and 16-byte SCSI R/W commands, transfer
1693                 * length 0 means transfer 0 block of data.
1694                 * However, for ATA R/W commands, sector count 0 means
1695                 * 256 or 65536 sectors, not 0 sectors as in SCSI.
1696                 *
1697                 * WARNING: one or two older ATA drives treat 0 as 0...
1698                 */
1699                goto nothing_to_do;
1700
1701        qc->flags |= ATA_QCFLAG_IO;
1702        qc->nbytes = n_block * scmd->device->sector_size;
1703
1704        rc = ata_build_rw_tf(&qc->tf, qc->dev, block, n_block, tf_flags,
1607                qc->tf_aga>);
1607        }
 (unkely(rc = <= )
16070/a>                goturn 0;
16070/a>
16070/a>        if (!< href="+code=sc" class="sref">rc = <= - href="+code=scERANG class="sref">ATERANG a>)
16171/a>                goto out_of_range;
1617        /* Foeat 0 all oer thror.
1617   href="+code=invalid_fld" class="sref">invalid_fld;
1617        re href="+code=ata_busi_set_sense" class="sref">ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0);
161714a>        /* Fouot;Invalid field in cbd" */
16171/a>          turn 1;
16171/a>
1617   href="+code=not_of_range" class="sref">out_of_range;
16171/a>        ata_scsi_set_sense(scmd, ILLEGAL_REQUEST, 0x21, 0x0);
161719a>        /* Fouot;Ingical Block Address out of range" */
162720a>          turn 1;
16272/a>
16272/a>   href="+code=inthing_to_do" class="sref">nothing_to_do:
16272/a>        re href="+code=atmd" class="sref">scmd->result = SAM_STAT_GOOD;
162724a>          turn 1;
162716272/a>
1627ata_scsi_seqc_mposlet a>(ata_queued_cmd *qc)
1627162729a>        ata_qurteda> *atapa> = qc->atapa> =163730a>        scsi_cmnd *atd = qc->scsicmd;
16373/a>        u8 *cdb = atd =gt;cmnd;
16373/a>        if  atne_cmnse" a> = qc->n_ror_mas a> = != )
16373/a>
163734a>        /* FoF ATA R/ps=" thru (SAT)ommands, segenere tha nse" lock ofifspan>
1637 *         use Lr nds,ed ATitr twifhe Sr#39;s LBaerror.
1637 *<        usgenere thbecae LBe SCe Lr forc ATu" to,ha cck anconditionspan>
1637 *         usissgenere tdnd takhATA coregistLr liduesre cuturn 1e/span>
1637 *         usether the convand */mposlet duccess, fullyr twthi. Ifhe Sr#span>
1637 *<        useaswthrror.<, SK, ASCnd taASCQ will all be ro o/span>
1647 *         u/span>
16474/a>        if (!<cdb[0] == WRA_QC" a>)
<| (cdb[0] == u3A_QC" a>)
<& 0mp; 0a href="drivers/ata/libata-scsi.c#L1617" id="L1637" class="line" name="L1647">16474/a>              cdb[0]2]amp; 0xff20)| atne_cmnse" a> =){
16474/a>                ata_scgen_ps="thruense" a>(qc)
<0a href="drivers/ata/libata-scsi.c#L1617" id="L1637" class="line" name="L1647">164744a>        16474/a>                atne_cmnse" a> =)
16474/a>                atd =gt;result = SAM_STAT_GOOD;
16474/a>                goelse {
16474/a>                        go an class="comment">/* FoTODO: decidesetich descripr coformatwtoCe Lspan>
16474/a> *<                        for 6-48bBA tovice
16575/a> *                         foinstLadf rae cofix dudesc,setich issonan>
16575/a> *                         fogoodor 6-small thA to(d comaybe CHS?/span>
16575/a>                 *         fovice
16575/a>                 *         f/span>
16575/a>                brrrrrrrrr href="+code=tfa_qugen_a_scsse" class="sref">ata_scgen_a_scsse" a>(qc)
<0a href="drivers/ata/libata-scsi.c#L1617" id="L1657" class="line" name="L1657">16575/a>                16575/a>        }
16575/a>
1657        ca (!< href="+code=scne_cmnse" class="sref">atne_cmnse" a> = mp; 0mp; 0 a href="+code=n_apclass="sref">atapa> =gt;tfop a>->n_roror_hd cl ta>)
1657                if href="+code=tfa_qudump_aticu class="sref">tfa_qudump_aticu a>(atapa> =gt;atprint_i a>, 0xmp;qc->atsult)
<0a href="drivers/ata/libata-scsi.c#L1617" id="L1667" class="line" name="L1667">16676/a>
16676/a>        qc->seci.cdon a>(atd =<0a href="drivers/ata/libata-scsi.c#L1617" id="L1657" class="line" name="L1667">16676/a>
16676/a>        re href="+code=ata_buqc_fre class="sref">ata_scqc_fre a>(qc)
<0a href="drivers/ata/libata-scsi.c#L1617" id="L1667" class="line" name="L1667">1667  1667  a href="drivers/ata/libata-scsi.c#L1607" id="L1657" class="line" name="L1667">16676/a> **
16676/a> *      LOa_scsi_seanslated  Translate SCe cn issuSCSI R/nvand */toCA driicean>
16676/a> *      sp@iic:CA driice
16676/a> *      Co@dan>
16777/a> *      RE@at
16777/a> *  span>
1677        REOur gt;
1677        REnvand */issuSdan fibe direcy suanslated ATto an ATA ospan>
16777/a> *      Convand *, raer the an ha cl ATto ernally/span>
16777/a> *  span>
16777/a> *      atThissfunction sets upn ATa_queued_cmd
16777/a> *      LOSI R/nvand *and tanseds thatwa_queued_cmd
16777/a> *
16777/a> *      CoT (aor c)uturn 1s 0a (!ad/wy/toCexecut/a>an>
16878/a> *      ATA counand *anse {
1/toCfinish enslate ion. Ifh1/issturn 1e/span>
16878/a> *      Zee cn d16878/a>        REtoCbe setstuflecyg inaerror.
16878/a>        RE ermine ion.span>
16878/a> *  span>
16878/a> *      &#CKING:
16878/a> *      atin_lock_irqsave(host lock)
16878/a> *  span>
16878/a> *      spTURNS:
16878/a> *      Co0n success, noSI R_ML_QUEUE_DEVICE_BUSYwifhe Sounand *span>
16979/a> *      ATne_csEtoCbe defecr.
16979/a> *  /span>
1697  atic unt ata_scsi_seanslated a>(dea_quvice" a> *dev, scsi_cmnd *atd =16979/a>                        ata_quat    href="+code=atatatat)
16979/a>{
16979/a>        struct ata_qurteda> *atapa> = dev, gt;n_ne" a>->atapa> =169796a>        struct ata_queued_cmd *qc)
16979/a>          t rc;
16979/a>
16979/a>        DPVINTK("noENTER");
1708
1708        qc-& ata_scsi_seqc_newa>(dev, atd =<0a href="drivers/ata/libata-scsi.c#L1618" id="L1708" class="line" name="L1708">17080/a>        if (qc)
17080/a>                  to n_ror_mema>;
17080/a>
1608           an class="comment">/* Fota.; dma-mapTitr /span>
1608        }
 (atd =gt;scsi_da_quvirecyiona>-& <scDMA_FROM_DEVICEa>-& ||a href="drivers/ata/libata-scsi.c#L1618"7id="L1608" class="line" name="L1698">16080/a>               href="+code=lbd" class="sref">atd =gt;scsi_da_quvirecyiona>-& <scDMA_TO_DEVICEa> =)
16080/a>                   (unlikely(scsi_16buffn" a>(atd =16080/a>                ifsca_buv(dev, "noRNING: onro onn" /w coreq");
16181/a>                go        to atror_di a>;
16181/a>                16181/a>
16181/a>                ata_scsg_ini a>(qc)
atsi_setglis a>(atd =<atsi_setg_unt 0a>(atd =<
16181/a>
16181/a>                qc->devmauvira>-& atd =gt;scsi_da_quvirecyiona>-&16181/a>        }
16181/a>
16181/a>        qc->cmdposlet _f a>-& ata_scsi_seqc_mposlet a>(<16181/a>
162820a>           (atat)
a href="+code=sc" class="sref">qc)
<16282/a>                atrarly_finisha>(<16282/a>
16282/a>        re (atapa> =gt;tfop a>->qc =)
16282/a>                br (!<< href="+code=rc" class="sref">rc;
 atapa> =gt;tfop a>->qc =a href="+code=sc" class="sref">qc)
<<16282/a>                qcdefeca> =16282/a>        }
16282/a>
16282/a>        /* Foselecyriice
16282/a>        ata_quec_issuSa>(qc)
<0a href="drivers/ata/libata-scsi.c#L1618" id="L1638" class="line" name="L1638">16383/a>
16383/a>        DPVINTK("noEXIT");
16383/a>        ifturn 0;
16383/a>
163834a>   href="+code=norarly_finishclass="sref">atrarly_finisha>(<163835a>        ata_scqc_fre a>(qc)
<0a href="drivers/ata/libata-scsi.c#L1618" id="L1638" class="line" name="L1638">163836a>        atd =gt;seci.c_don a>(atd =<0a href="drivers/ata/libata-scsi.c#L1618" id="L1628" class="line" name="L1638">163837a>        DPRINTK("noEXIT - rarlyCfinish (goodoothror.<)");
163838a>        ifturn 0;
16383/a>
1648atror_di a>;
16484/a>        ata_scqc_fre a>(qc)
<0a href="drivers/ata/libata-scsi.c#L1618" id="L1638" class="line" name="L1648">16484/a>        atd =gt;result = DPRID_ERRORa> = t;< 3)16<0a href="drivers/ata/libata-scsi.c#L1618" id="L1628" class="line" name="L1648">16484/a>        re href="+code=atd" class="sref">atd =gt;seci.c_don a>(atd =<0a href="drivers/ata/libata-scsi.c#L1618" id="L1638" class="line" name="L1648">164844a>   href="+code=noror_memclass="sref">n_ror_mema>;
164845a>        DPRINTK("noEXIT - to ernal");
16484/a>          turn 0;
16484/a>
16484/a>   href="+code=nodefecclass="sref">qcdefeca> =16484/a>        ata_scqc_fre a>(qc)
<0a href="drivers/ata/libata-scsi.c#L1618" id="L1658" class="line" name="L1658">165850a>        DPRINTK("noEXIT - defec");
16585/a>        if (!< href="+code=rc" class="sref">rc;
 <DPA_QCDEFER_LIN a>)
16585/a>                DPSI R_MLQUEUE_DEVICE_BUSYa> =16585/a>        rese {a href="drivers/ata/libata-scsi.c#L1688" id="L1638" class="line" name="L1658">16585/a>                brturn 0; href="+code=WRSI R_MLQUEUE_HOST_BUSYclass="sref">DPSI R_MLQUEUE_HOST_BUSYa> =16585/a>16585/a>
16585/a> **
16585/a> *      spa_scsi_serbuf_get - Maprtuspoe" louffec/span>
16585/a> *      Co@d
16686/a> *      RE@agsan>
16686/a> *      Ze@copy_in: copyn cbfromCe Lr ouffeca>an>
16686/a>    a>an>
16686/a>        REPreparerouffecEr 6-simuted ATSI R/nvand *s/span>
16686/a> *  span>
16686/a> *      &#CKING:
16686/a> *      atin_lock_irqsave(hoa_scsi_serbuf_ck)
16686/a> *  span>
16686/a> *      spTURNS:
16686/a> *      CoPoto er/toCtuspoe" louffec/span>
16787/a> *  /span>
16787/a>ata_scsi_serbuf_geta>(scsi_cmnd *atd =atooola> *< href="+code=flmppy_inclass="sref">cmdppy_ina> =16787/a>                flags |167816787/a>        scsn_lock_irqsave(ha>(ata_scsi_serbuf_ck, flags |<16787/a>  a href="drivers/ata/libata-scsi.c#L1608" id="L1658" class="line" name="L1678">167876a>        atmemseta>(ata_scsi_serbufa>, scA_QCSI R_RBUF_SIZEa> |<16787/a>          t(cmdppy_ina> =16787/a>                   href="+code=rcig_unpy_to_buffecclass="sref">scsg_unpy_to_buffeca>(atsi_setglis a>(atd =<atsi_setg_unt 0a>(atd =<16787/a>                ifata_scsi_serbufa>, scA_QCSI R_RBUF_SIZEa> |<168880a>          turn 1; href="+code=rca_scsi_serbufclass="sref">ata_scsi_serbufa>, 16888/a>16888/a>
16888/a>  *
16888/a> *        a_scsi_serbuf_put - Unmaprtuspoe" louffec/span>
16888/a> *      &#@d
16888/a> *      at@copy_out: copynt ofsultan>
16888/a> *      at@ags
16888/a> *  span>
16888/a> *      CoRurn 1s rbuflouffec/CoT
16989/a> *      AT@copy_ba ofis ucte/span>
16989/a> *  span>
16989/a>        RECKING:
16989/a>        REUnck
16989/a> *  /span>
16989/a>  atic un href="+code=rcinne" naass="sref">atinne" a>   vo fi href="+code=u6a_busi_serbuf_putclass="sref">ata_scsi_serbuf_puta>(scsi_cmnd *atd =atooola> *< href="+code=flmppy_outclass="sref">atmppy_outa> =16989/a>                flags |16989/a>  16989/a>        ca (!< href="+code=scmppy_outclass="sref">atmppy_outa> =16989/a>                if href="+code=tfsg_unpy_from_buffecclass="sref">scsg_unpy_from_buffeca>(atsi_setglis a>(atd =<atsi_setg_unt 0a>(atd =<17090/a>                go        re           href="+code=rca_scsi_serbufclass="sref">ata_scsi_serbufa>, scA_QCSI R_RBUF_SIZEa> |<1709        scsn_lounck_irqsasultorea>(ata_scsi_serbuf_ck, flags |<17090/a>  17090/a>
17090/a> **
16090/a> *      &#a_scsi_serbuf_fill - wrapp.cEr 6-SI R/nvand */simutedor span>
16090/a> *      at@ar
16090/a> *      at@aor c: Callba ofhookEr 6-desir ATSI R/nvand */simutedorspan>
16090/a> *  span>
16090/a> *      CoTakes carer rae cohard workr rasimutedg inaTSI R/nvand *../span>
16191/a> *      ATMappg int
16191/a> *      Zed */hd clg int
16191/a>        REindice Ssoether the cohd cl t wisheswe SCSI L/nvand */toCbespan>
16191/a>        REnvaslet duccess, fullyr(0<
16191/a> *        a tanse" louffecue cus="unt/EtoCbe set)/span>
16191/a> *  span>
16191/a> *      atCKING:
16191/a> *      atin_lock_irqsave(host lock)
16191/a> *  /span>
16191/a>
ata_scsi_serbuf_filla>(ata_scsi_sear *atar *16292/a>                gounsigned t atacdorsp |ata_scsi_sear *atar *atu8a> *atrbufa>, <16292/a>  16292/a>        atu8a> *atrbufa>, 16292/a>        reunsigned t rc;
16292/a>          ruct scsi_cmnd *atd = atar *gt;atd =16292/a>          unsigned longl href="+code=scags" class="sref">flags |16292/a>
162927a>        atrbufa>,  ata_scsi_serbuf_geta>(atd =atfal" a> =flags |<16292/a>        rc;
 atacdorsp |a href="+code=scaratar *atrbufa>, <16292/a>        ata_scsi_serbuf_puta>(atd =rc;
 <flags |<16393/a>
16393/a>        if (!< href="+code=rc" class="sref">rc;
 <16393/a>                atd =gt;result = SAM_STAT_GOOD;
16393/a>        re href="+code=ataratar *gt;sedon a>(atd =<0a href="drivers/ata/libata-scsi.c#L1619" id="L1639" class="line" name="L1639">16393/a>  16393/a>  a href="drivers/ata/libata-scsi.c#L1609" id="L1639" class="line" name="L1639">16393/a> **
16393/a> *      LOa_scsi_sop_inq_std - Simuted  INQUIRYounand *span>
16393/a> *      sp@ar
16393/a> *      Co@rbuf: Rulpoe" louffec,otoCetich simuted ATSI R/nmdnt oput isanset/span>
16494/a> *  span>
16494/a> *      ZeRurn 1s std *ard iiceifice ionrta.
16494/a>        REwith non-VPD INQUIRYounand *nt oput/span>
16494/a>    span>
16494/a> *        CKING:
16494/a> *      &#in_lock_irqsave(host lock)
16494/a> *  /span>
16494/a>
ata_scsi_sop_inq_stda>(ata_scsi_sear *atar *atu8a> *atrbufa>, 16494/a>  16494/a>        atu8a> *< href="+code=atrs/aion/class="sref">atrs/aion/a> *[] 16595/a>                go0x60/* FoM_S-3 (no rs/aionlassimed)  /span>
16595/a>  a href="drivers/ata/libata-scsi.c#L1619" id="L1639" class="line" name="L1659">16595/a>                16595/a>        re      /* FoMBC-2 (no rs/aionlassimed)  /span>
16595/a>
16595/a>                16595/a>                /* FoMPC-3 (no rs/aionlassimed)  /span>
165957a>        16595/a>        atu8a> *< href="+code=athdcclass="sref">athdca> *[] 16595/a>                if href="+code=tfTYPE_DIS class="sref">DPTYPE_DIS a> *16696/a>                go016696/a>                /* FoassimoMPC-3 rs/aionlaompic bility  /span>
16696/a>                16696/a>        re      166964a>        16696/a>  a href="drivers/ata/libata-scsi.c#L1609" id="L1659" class="line" name="L1669">166966a>        DPVINTK("noENTER");
16696/a>
16696/a>        /* Foset si.c removeabl//(RMB) bit p.cEa.
16696/a>           (ata_scid_removeabl/sp |a href="+code=scaratar *gt;atida>, <16797/a>                go href="+code=athdcclass="sref">athdca> *[1] |= (1 t;< 3)7
16797/a>  a href="drivers/ata/libata-scsi.c#L1619" id="L1659" class="line" name="L1679">16797/a>        unmemcp sp |a href="+code=scrbufclass="sref">atrbufa>, athdca> *, sizeofa href="+code=schdcclass="sref">athdca> *<
16797/a>        re href="+code=atmemcp class="sref">unmemcp sp |amp;atrbufa>, [8]"noATA   reuot;);, 8
16797/a>        &lass="sref">ata_scid_ring">sp |a href="+code=scaratar *gt;atida>, atrbufa>, [16]SAA_QCID_PR" a>, 167975a>        &lass="sref">ata_scid_ring">sp |a href="+code=scaratar *gt;atida>, atrbufa>, [32]SAA_QCID_FW_REVa>, 16797/a>
16797/a>          t(atrbufa>, [32] <atrbufa>, [32] <&qu9;s  u9;s span>);
a href="drivers/ata/libata-scsi.c#L1559" id="L1659" class="line" name="L1679">16797/a>                   href="+code=rcmemcp class="sref">unmemcp sp |amp;atrbufa>, [32]"non/aeuot;);, 4<0a href="drivers/ata/libata-scsi.c#L1619" id="L1669" class="line" name="L1679">16797/a>
168980a>        unmemcp sp |a href="+code=scrbufclass="sref">atrbufa>,  + 59atrs/aion/a> *, sizeofa href="+code=scrs/aion/class="sref">atrs/aion/a> *<
16898/a>  a href="drivers/ata/libata-scsi.c#L1619" id="L1659" class="line" name="L1689">16898/a>        ifturn 0;
16898/a>16898/a>
16898/a> **
16898/a> *      ata_scsi_sop_inq_00 - Simuted  INQUIRYoVPD pagea0
16898/a> *      at@ar
16898/a> *      at@rbuf: Rulpoe" louffec,otoCetich simuted ATSI R/nmdnt oput isanset/span>
16898/a> *  span>
16999/a> *      ATRurn 1s lis /of inquiryoVPD pages availabl//span>
16999/a> *  span>
16999/a>        RECKING:
16999/a>        REin_lock_irqsave(host lock)
16999/a> *  /span>
16999/a>  atic ununsigned t ata_scsi_sop_inq_0/a>  sruct ata_scsi_sear *atar *atu8a> *atrbufa>, 16999/a>  16999/a>          coe"atu8a> *< href="+code=atpagesclass="sref">atpage sp *[] 16999/a>                  0x00/* Fopagea0x00
16999/a>                if0x80/* Fopagea0x80
20" a>                if0x83/* Fopagea0x83spagea /span>
 href="drivers/ata/libata-scsi.c#L1620"1id="L1720" class="line" name="L1620" c>20"/a>                /* Fopagea0x89
20"/a>                /* Fopagea0xb0
20"/a>        re      /* Fopagea0xb1
20"/a>                br0xb2/* Fopagea0xb2
20"5a>        20"/a>
20"7a>        atrbufa>, [3] atpage sp *);      /* Fonumberr rasuppord ATVPD pages  /span>
20"/a>        unmemcp sp |a href="+code=scrbufclass="sref">atrbufa>,  + 4atpage sp *, sizeofa href="+code=scpagesclass="sref">atpage sp *)
20"/a>          turn 0;
20" a>20"/a>  a href="drivers/ata/libata-scsi.c#L1620"2id="L1720" class="line" name="L1620" c>20"/a>  *
20"/a>        REa_scsi_sop_inq_80 - Simuted  INQUIRYoVPD pagea80
20"/a> *        @ar
20"/a> *      &#@rbuf: Rulpoe" louffec,otoCetich simuted ATSI R/nmdnt oput isanset/span>
20"/a> *  span>
20"/a> *      atRurn 1s ATA iice
20"/a> *  span>
20"/a> *      CoCKING:
20" a>        REin_lock_irqsave(host lock)
20"/a> *  /span>
20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar *atu8a> *atrbufa>, 20"/a>20"/a>          coe"atu8a> *< href="+code=athdcclass="sref">athdca> *[] 20"/a>                20"/a>                /* Fothisspageade=a  /span>
20"7a>                20"/a>                   href="+code=rcA_QCID_SERNO_LENclass="sref">SAA_QCID_SERNO_LENa> */* Fopagealen  /span>
20"/a>          }0a href="drivers/ata/libata-scsi.c#L16203 id="L1720" class="line" name="L1620" c>20" a>  a href="drivers/ata/libata-scsi.c#L162031id="L1720" class="line" name="L1620" c>20"/a>        unmemcp sp |a href="+code=scrbufclass="sref">atrbufa>, athdca> *, sizeofa href="+code=schdcclass="sref">athdca> *<
20"/a>        &lass="sref">ata_scid_ring">sp |a href="+code=scaratar *gt;atida>, atrbufa>, [4]20"/a>        re      SAA_QCID_SERNOa>, SAA_QCID_SERNO_LENa> *
20"/a>          turn 0;
20"/a>atd =16585/a>/* ity="sref">atd =16393/a> *        @ar
20"/a> *      &#@rbuf: Rulpoe" louffec,otoCetich simuted ATSI R/nmdnt oput isanset/span>
16999/a> *  span>
16999/a> *      CoCKING:
20"/a>
20"/a>20"/a>20"/a> *  span>
20" a>SAA_QCID_SERNO_5: iice/Iod> *  /span>
20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar */* FoM_S-3 (no rs/oCmen>/Io">atrbufa>, </Io">athdca> *<
ata_" name_me=c_+co"+code=scarata_" name_me=c_+co>athd= 68"drivers/ata/libata-scsi.c#L1620"4id="L15urn 1s stde" name="L1659">16595/a>tde" >/Ioatrbufa>, [4]"drivers/ata/libata"L1"+code=scar/* FoMBC-2 (no rs/mmmen>/Io9">16898/a>/IoPR" a>, atar   L172ef="+codeef="driverc#L1620"6id="L1720" class="line" name="L1620" c>20"/a>                16595/a>sse" >/Io69">16696/a>  a href="driver"L1"+code=scar/* FoMPC-3 (no rs/"Lmen>/Ioot;);
16696/a>
20"/a>                /Io">atrbufa>, <atar   2"drivers/ata/libata-scsi.c#L1620"4id="L16: iice/I"+>atrbufa>, <atar20"/a>        re      16696oClin>/I"20" c>20" a>  a href="driver"L1"+code=scar/I"">athdca> *<
20"/a>        &lass="sref">ata_scid_ring">sp |a href="+1720" class="line" name="L1620" c>20"/a>      a href="driver"L1"+code=scaratida>, 16696tdlin>/I"atrbufa>, [4]20"/a>        re      SAA_QCID_SERNOa>, 16696/a> mm" n>/I");, 8
20"/a>        re              /I"69">16696/a>
20"/a>                "n"Ln c>/I"79">16696/a>
aL1620" c>20"/a>                /I">flags |<atar   2"drivers/ata/libata-scsi.c#L1620"4id="L1680 - Sis="si.c removeabl//(RMB) bi="si.>/I"">atrbufa>, <atar   1"drivers/ata/libata-scsi.c#L1620"4id="L17: iice/I *>atrbufa>, <atar20"/a>  sat_s>ata_" name_me=c_+co"+code=scarata_" name_me=c_+co>ath"drivers/ata/libata-scsi.c#L1620"4id="L17uffec,otoChdcclass="sref">athdca> oChdc>/I 20" c>20" a>  a href="driver"L1"+code=scar/I 79">16797/a>  a href="drivers/ata/libata-scsi.c#L1619" id="L1659" class="line" name="L1679">16797/a>      a href="driver"L1"+code=scarunmemcp sp |amp;atrbufa>/I urn 1s stdeofa href="+code=schdccltdeof>/I ">athdca> *<
"noATAmmass>/I );, 8
16797/a>        &lass="sref">ata_scid_ring">sp |a href="+1720" class="line" name="L1620" c>20"/a>      a href="driver"L1"+code=scaratida>, @dA_Q>/I thdca> *[] SAA_QCID_SERNOa>, SssCID>/I 69">16696/a>  a href="driver"L1"+code=scar20"/a>        ra hr  SAA_QCID_SERNOa>, /I 20" c>20"/a>
16797/a>        &lass="sref">ata_scid_ring">sp |a href="+1720" class="line" name="L1620" c>20"/a>      a href="driver"L1"+code=scarSAA_QCID_SERNOa>, SAA_QCID_SERNOa>, "n="n c>/I ">atrbufa>, <20"/a>        re      /Iid>        /Ii39">16393/a>
16797/a>        &lass="sref">ata_scid))        coe"/Iirc;
 <20"/a>                1689td"li>/Iiatrbufa>, [4]20"/a>                atar   1"drivers/ata/libata-scsi.c#L1620"4id="L18s     &#@did="L1669" class="line" @did=>/Iithdca> *[] atar   3"drivers/ata/libata-scsi.c#L1620"4id="L18mID_lclass689">16898/a>/Ii          atar20"/a>        rWWN  /Iide=a  /span>
/Ii          16797/a>        &lass="sref">ata_scid_ring">sp |a href="+1720" class="line" name="L1620" c>20"/a>      a href="driver"L1"+code=scarSAA_QCID_SERNOa>, 16898/a>/I16e=a  /span>
20"/a>        rWWN  16393/a>
turn 0;
16999/a>/I179">16797/a>  a href="drivers/ata/libata-scsi.c#L1520"7id="L1 a href="driver"L1"+code=scar16595/a>                  td/I1atrbufa>, [4]        REin_lock_irqsmm"> >/I1f">atd =<0a href="drivers/ata/libata-sc/I1s     &#@d699">16999/a>/I1a>        /I139">16393/a>  a href="drivers/ata/libata-scsi.c#L1609" id="L1639" class="l/I1e" name="Ld="L1699" class="line" n"Ld=">/I1"> **
/I1unand *span>
16393/a> *      sp@a/I180 - Sis="s="comment">/* Fopagea0x="s=">/I1 erult/span>
16393/a> *      Co@rbuf: Rulpoe"21ss="commen1">/* Fopagea0x80
 *  span>
 *      Co@rbuf: Rulpoe"21s2="commen1"699">16999/a> *  span>
 *      Co@rbuf: Rulpoe"21s3="commen1"span class="comment">  t1limit10KING:

20" a>1* Fopagea0xb2
16595/a>                  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar */* Fonumberr rasuppord1ATVPD1pages  /span>
20"2a>  atic ununsigned t taskfi#L1619" id="L1669" cltaskfi#Lges   atic ununsignet="+code=scar16292/a>        /* Fopagea0x=1"sref10);, 4<0a href="drivers/ata/libata-s21720" class1"line" name="L1620" c>20"1a>   1179">16797/a>
162927a>     s/as29ss="lcode=scar162,ame=memcp sp |a href="+codt="+code=scar162ufa>, at1.c#L16201 1d="L1720" class="line" na1e="L1120" c>20" a>16797/a>  a href="drivers/ata/libata-scsi.c#L1520"7ia>   L179ef="+codeef="driverc#L1620"6id="L1720" clasourine" name="L1620" c>20"/a>                20"/a>athdca> *<
20"/a>                );, 8
at1.comment">1DENTIFYota.        16696/a>  a href="drivers/ata/libata-scsi.c#L1689" id="L1669" class="line" name="L1679">16797/a>        re href="+code=atmemcp class="sed ux nmemcp sp |amp;atrbufa>/1ne" name="11620" c>20"/a>20"/a>
16797/a>        a> *gtef="+code=atmemcp class="sedref"eef="driveemcp sp |amp;atrbufa>, [16]sp |a href="+code=scaratar *gt;162,a;atrbua119s="comme11620" c>20"/a>atrbufa>, <16797/a>        &lass="sref">ata_scid_ring">sp |a href="+code=scaratar *gt;atida>, atrbufa>, [32]20"/a1 * 1    C12d>                REin_lock_irqsa1e(hos1220" c>20" a>  c#L1620"6id="L1720" claswe donbufa>t
20oreta"line" #L1620"7"L169uree=moswe fake " name="L1669">16696/a>        20"/a> * 9">16696/a>        athdca> *<
162.atida>, 1629eef="driverc#L1620"6id="L1720" clasreally9" claslasS/spussregname="L1669">16696/a>        162.atu8a> 1< href="+code=athdcclass=1sref"12PR" a>, 162.162927a>     nsec9ambu   0x1"drivers/ata/libata-scsi.c#L1620"4id="L1fuffec,oto1line" name="L1620" c>20"/1>    120" c>20"/a>/* Foth1sspag1220" c>20"/a>
162,ame=1_ring">sp |a href="+code=scaratar16696/a>        20"71>    12>flags |<atar16595/a>                 */1 Fopa12);, 4<0a href="drivers/ata/libata-s219id="L17201 class="line" name="L16201 c>2013*>atrbufa>, <atar20"/a>      CMD;atida>, 16292/a>        20" a>athdca> *<
sp |a href="+code=scaratarsp |a href="+co9">16797/a>        &lass="sref">ata_scid[0]_r512crbufclass="sref">atrbufa>, [32], [4]SA1_QCID13f">atd =<0a href="drivers/ata/libata-sc/1720" class1"line" name="L1620" c>20"1a>   13a>        20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar *at1 13a>        a169">16 */* ity="sref">at1 13);, 4<0a href="drivers/ata/libata-s21/: iiceatrbufa>, <atar   L1b="drivers/ata/libata-scsi.c#L1620"4id="L1ouffec,oto1etich simuted ATSI R/nmdn1 oput1420" c>20" a>  a href="drivers/ata/libata-scsi.c#L1520"7id="L10x3cref="driverc#L1620"6id="L1720" clasre" ida href=memc with>
16595/a>                16999/a> * 9">16696/a>         * 1    C14">athdca> *<
16595/a>                
granularityspan class="comment"> *      Co@rbuf: Rulpoe"21"s     &#@1
 *      Co@rbuf: Rulpoe"21"c#L1620351="RYoVPD page 6-simuted A1SI R/1vand *s/span>
a small" c>20"/a>20"/a> *  span>
20"/a>20"/a>16595/a>                /1579">16797/a>
16797/a>        &lass="sref">ata_scidcrbufclass="sref">atrbufa>, [32]/* FoM_S-3 (no rs/o1men>/1520" c>20" a>  a href="driverput_unal href_beetich simutsref">put_unal href_beetss="line" name="L167sin_io_sec9ornq_8/a>  sruct 162_ring">sp |a href="+code=scarataratrbufa>, [32]/15"> * 9">16696/a>        16595/a>t1e" >/15">athdca> *<
16595/a>                /* FoMBC-2 (no rs/m1men>/15 numberspan>
 *      Co@rbuf: Rulpoe"21os     &#@1id="L1639" class="line" @1id=>/15 numberspan>
 *      Co@rbuf: Rulpoe"215mID_lclas1e" name="L1659">16595/a>s1e" >/15and *s/span>
t
even know ab639 a *      Co@rbuf: Rulpoe"215e" name="1ment">/* FoMPC-3 (no rs/"1men>/15t"> *  span>
 *      Co@rbuf: Rulpoe"215riehref="1 class="line" name="L165a1 cl>/15a href="+co1sruct  *      Co@rbuf: Rulpoe"21580 - Sis=1< href="+code=athdcclass=1< h>/15a href="+co1sruct  *      Co@rbuf: Rulpoe"216: iice/16sanset/span>
a"li
 *      Co@rbuf: Rulpoe"216uffec,oto1line" name="L1669">16696o1lin>/16t"> *  span>
16595/a>                /1"">athdca> *<
16797/a>        &lass="sref">ata_scidc)        coe"16696t1lin>/1"atrbufa>, [4]put_unal href_be"sp |a href="+code=scaratar16696/a> m1" n>/16pagea /span>
put_unal href_bef">ath(1_ring">sp |a href="+code=scaratar/16pagea /span>
<      coe"/160" c>20"/a>"n"1n c>/1"79">16696/a>
/1">flag<      coe"/16);, 4<0a href="drivers/ata/libata-s217: iice/17d> *  /span>
20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar *athdca> o1hdc>/17">atrbufa>, </1 79">16797/a> "drivers/ata/libataform_fac9orscsi.c#L1689" iform_fac9orambu   t;16797/a>        &lass="sref">ata_scidcrbufclass="sref">atrbufa>, [32]16797/a>        &lass="sref">ata_scidcrbufclass="sref">atrbufa>, [32]"noATAm1ass>/179">16898/a>@1hdca>18PR" a>, atar   L1b1"drivers/ata/libata-scsi.c#L1620"4id="L17mID_lclas1CID_FW_REVclass="sref">Ss1CID>/1 69">16696/a>  a href="drivers/ata/libata-scsi.c#L1520"7id="L10x3crdrivers/ata/libata-scsi.c#L1620"4id="L17e" name="1id="L1659" class="line" "1id=>/1 20" c>20"/a>
atar *gt;atar"n=1n c>/1 ">atrbufa>, <atar/1id>        /1i39">16393/a>
/1irc1689t1"li>/1iatrbu      coe"-scsi.c#L162022bo0" c>20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar */1ithdcabufa>, <16898/a>/1i          20"/a>                /1820" c>20"/a>
atar *gt;/18>flags |<atar   L14"drivers/ata/libata-scsi.c#L1620"4id="L1880 - Sis=1etich simuted ATSI R/nmd=1eti>/18">atrbufa>, <atar20"/a>                16898/a>/19d>        16393/a>
16999/a>/19rc  t1/19atrbu      coe"        REin_lock_irqsm1"> >/19 numberspan>
16999/a>/19 numberspan>
20"/a>16393/a>  a href="drivers/ata/libata-scsi.c#L1649" id="L1629" class="line" name="L1639">16393/a> *      sp@a/11e" name="1d="L1699" class="line" n"1d=">/11"> **
16393/a> *      Co@rbuf: Rulpoe"211="sr1/11unand *span>
 *      Co@rbuf: Rulpoe"21180 - Sis=1s="comment">/* Fopagea0x=1s=">/11 erult/span>
/* Fopagea0x80
 *      Co@rbuf: Rulpoe"2201="commen2"1s lis /of inquiryoVPD o26955120t"> *  span>
 *      Co@rbuf: Rulpoe"2202="commen2"699">16999/a> *  span>
  t2limit20KING:
20" a>
20"/a>                2* Fopagea0xb2
-scsi.c#L16noop0" c>20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar *20"/a>
atrbufa>, [32]/* Fonumberr rasuppord2ATVPD2pages  /span>
/* Fopagea0x=2"sref2020"2a>   21d>         *  span>
 *  span>
 *      Co@rbuf: Rulpoe"22e" name="L2620" c>20"/a>
1699" idpan class="comment"> *      Co@rbuf: Rulpoe"22e Fopagea02NQUIRYoVPD pagea80
 *      Co@rbuf: Rulpoe"22.comment">2DENTIFYota.
 nas>atne" npan class="comment"> *      Co@rbuf: Rulpoe"22.id="L17202etich simuted ATSI R/nmdn2 oput2139">16393/a>  a href="drivers/ata/lichingeable:629ea"lr chingeablene"r R/="Ls are
 *      Co@rbuf: Rulpoe"22..c#L1620"21620" c>20"/a> **
 *      Co@rbuf: Rulpoe"22.ss="comme2     atRurn 1s ATA iice
 *      Co@rbuf: Rulpoe"22.9s="comme21620" c>20"/a>
 *      Co@rbuf: Rulpoe"220" c>20"/a2 * 2    C22sanset/span>
        REin_lock_irqsa2e(hos22t"> *  span>
20"/a> *  span>
 *      Co@rbuf: Rulpoe"222" name="L2 *
20"/a>                atcpylibata-scsi.c#L1>atcpyss="line" name="L167arata_scsi_sear *d163ef="+cata_scsi_sear *srcef="+c"drivers/ata/libata"nef="+code=ata_scsi_sebool"+code=scaratar *atu8a> 2< href="+code=athdcclass=2sref"22thdcabufa>, <20"/2>    22          /* Foth2sspag22de=a  /span>
d163ef="+c_sear *srcef="+c2crbufclass="sref">atrbufa>, [32]20"72>    22          162927a>     s/as29ss="l1659" class="lid163d163ef=" + 2,ame=vers/ata/libata"nef="<-=2crbufclass="sref">atrbufa>, [32]/2 Fopa22">atrbufa>, <} elL16       coe"d163ef="+c_sear *srcef="+cvers/ata/libata"nef="crbufclass="sref">atrbufa>, [32]16393/a>
turn 0;
SA2_QCID23 numberspan>
20"2a>   23 numberspan>
 *      Co@rbuf: Rulpoe"22.c#L1620352d="L1720" class="line" na2e="L12339">16393/a>  a href="drivers/ata/liid-scsi.c#L1649" id="L16pan class="comment"> *      Co@rbuf: Rulpoe"22.aaaaaaaa 2id="L1720" class="line" n2me="L23"> **
1699" idpan class="comment"> *      Co@rbuf: Rulpoe"22driehref="2code=scd" class="sref">at2 23unand *span>
 *      Co@rbuf: Rulpoe"22iENa> */* ity="sref">at2 23 erult/span>
 *      Co@rbuf: Rulpoe"22/: iice
 *      Co@rbuf: Rulpoe"22/.c#L162032etich simuted ATSI R/nmdn2 oput24t"> *  span>
 *      Co@rbuf: Rulpoe"22/ca> *, si21699">16999/a> *  span>
 *      Co@rbuf: Rulpoe"22Rurn 1s st2 *arelass.cEr omment"> * 2    C24KING:
 *      Co@rbuf: Rulpoe"22Re=atA_QCI2enUIRYoVPD pagea80

 *      Co@rbuf: Rulpoe"22"c#L1620352="RYoVPD page 6-simuted A2SI R/2vand *s/span>
20"/a>                20"/a> * /span>
a169">16i_sear *&lass="sref">ata_scid_rine" name="L167arata_scsi_sear *atar *atrbufa>, <d1f_cache_me" n"sre+cmemcp sp |a href="+coddef_cache_me" nd1f_cache_me" n"sre)+code=ata_scsi_sechingeable"+code=scaratrbufa>, [32]/2579">16797/a>
&lass="sref">atd="L163wcache_enable>ss="line" name="L167">&lass="sref">ata_scidc)bufclass="sref">atrbufa>, [32]/* FoM_S-3 (no rs/o2men>/2520" c>20" a> bufa>, <20"/a>                /25">athdca> *<
+ode= !ref="drivers/atd="L163rahead_enable>&lass="sref">atd="L163rahead_enable>ss="line" name="L167">&lass="sref">ata_scidc)bufclass="sref">atrbufa>, [32]16595/a>t2e" >/25atrbufa>, [4]20"/a>                /* FoMBC-2 (no rs/m2men>/25pagea /span>
d1f_cache_me" n"sre)rbufclass="sref">atrbufa>, [32]/25 numb<      coe"16595/a>s2e" >/250" c>20"/a>/* FoMPC-3 (no rs/"2men>/25t"> *  span>
 *      Co@rbuf: Rulpoe"22580 - Sis=2< href="+code=athdcclass=2< h>/25a href="+co1sruct 1699" idpan class="comment"> *      Co@rbuf: Rulpoe"226: iice/26sanset/span>
 *      Co@rbuf: Rulpoe"226uffec,oto2line" name="L1669">16696o2lin>/26t"> *  span>
/26t"> *  span>
 *      Co@rbuf: Rulpoe"226urn 1s st2line" name="L1669">16696t2lin>/26KING:
 *      Co@rbuf: Rulpoe"226d16696/a> m2" n>/26 numberspan>
 *      Co@rbuf: Rulpoe"226mID_lclas2id="L1669" class="line" s2id=>/26and *s/span>
20"/a>                "n"2n c>/26t"> * /span>
ata_scsi_sear *atar */26a hre       coe"/26">atrbufa>, <d1f_control_me" n"sre+cmemcp sp |a href="+coddef_control_me" nd1f_control_me" n"sre)+code=ata_scsi_sechingeable"+code=scaratrbufa>, [32]d1f_control_me" n"sre)rbufclass="sref">atrbufa>, [32]athdca> o2hdc>/27">atr<      coe"/27"> * 9">16696/a>        /27KING:
"noATAm2ass>/27 numberspan>
 *      Co@rbuf: Rulpoe"22ta/libata-2A_QCID_PR" class="sref">@2hdca>27 numberspan>
1699" idpan class="comment"> *      Co@rbuf: Rulpoe"227mID_lclas2CID_FW_REVclass="sref">Ss2CID>/2739">16393/a>  a href="drivers/ata/lichingeable:629ea"lr chingeablene"r R/="Ls are
 *      Co@rbuf: Rulpoe"227e" name="2id="L1659" class="line" "2id=>/27"> **
 *      Co@rbuf: Rulpoe"227="sr1MODE SENSEnr/w error reco609yne" nspan class="comment"> *      Co@rbuf: Rulpoe"22780 - Sis=2n class="string">"n=2n c>/27 erult/span>
 *      Co@rbuf: Rulpoe"228: iice/28sanset/span>
/28t"> *  span>
 *      Co@rbuf: Rulpoe"228e" name="2id="L1679" class="line" "2id=>/28t"> *  span>
20"/a>                1689t2"li>/2iatrbu /span>
ata_scsi_sear *atar */28PR" a>, d1f_rw_reco609y_me" n"sre+cmemcp sp |a href="+coddef_rw_reco609y_me" nd1f_rw_reco609y_me" n"sre),      coe"16898/a>/2i          , atrbufa>, [32]/2879">16696/a>
d1f_rw_reco609y_me" n"sre)rbufclass="sref">atrbufa>, [32]/28);, 4<0a href="drivers/ata/libata-s229: iice16898/a>/29sanset/span>
16595/a>                /29t"> *  span>
 *      Co@rbuf: Rulpoe"229e" name="21699">16999/a>/29t"> *  span>
 *      Co@rbuf: Rulpoe"229urn 1s st2  t2/29KING:
20"/a>                        REin_lock_irqsm2"> >/29pagea /span>"drivers/ata/libata-scsdev_asizeofs_fua+code=rca_scsi_sop_dev_asizeofs_fuass="line" name="L167aetich simutsref">a169">16i_sear *&lass="sref">ata_scidf">atar *16999/a>/29thdcabufa>, </29          atl"srei0a href="driveramp;atrbufa>, [32] **bufclass="sref">atrbufa>, [32]/29          atar */* Fopagea0x=2s=">/299         , /* Fopagea0x8016797/a>
&lass="sref">ata_scidc)bufclass="sref">atrbufa>, [32]20" a> bufa>, <16999/a> * 9">16696/a>          t3limit30">athdca> *<
&lass="sref">ata_scid_rine" name="L167m>atl"+code=scaratl"sre*gt;atl"sre))rbufclass="sref">atrbufa>, [32]);, 8
&lass="sref">ata_scid_rine" name="L167fw       href="+cfw"sre*gt;atida>, atrbufa>, [32]16999/a>        9" cmpss="line" name="L167m>atl"+code=scaratl"sre*gtef="+code=atmemcp class="sMax9oremcp sp |amp;c)bufclass="sref">atrbufa>, [32]/* Fonumberr rasuppord3ATVPD30          9" cmpss="line" name="L167fw       href="+cfw"sre*gtef="+code=atmemcp class="sBANC1G10emcp sp |amp;c)bufclass="sref">atrbufa>, [32]/* Fopagea0x=3"sref309         , 20"3a>   31d>        16393/a>
20"/a>                20"/a>
3DENTIFYota.
 *      Co@rbuf: Rulpoe"23.id="L17203etich simuted ATSI R/nmdn3 oput3139">16393/a>  a href="drivers/ata/libata-scsi.c#L1649" id="L1629" class="line" name="L1639">16393/a> *      sp@a/3..c#L1620"31620" c>20"/a> **
16393/a> *      Co@rbuf: Rulpoe"23.ss="comme3     atRurn 1s ATA iice
 *      Co@rbuf: Rulpoe"23.9s="comme31620" c>20"/a>
 *      Co@rbuf: Rulpoe"230" c>20"/a3 * 3    C32sanset/span>
 *      Co@rbuf: Rulpoe"230c#L16201 3">        REin_lock_irqsa3e(hos32t"> *  span>
 *      Co@rbuf: Rulpoe"232.c#L1620"3620" c>20"/a> *  span>
 *      Co@rbuf: Rulpoe"232" name="L3 *
20" a>atu8a> 3< href="+code=athdcclass=3sref"32 numberspan>
20"/a>                20"/3>    32a>    /span>
  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar */* Foth3sspag3220" c       coe"20"73>    32            atic ununsigned t csi.c#+code=rca_scsi_sop_dev.c#pascsi_sear *d1vpascs  t;16797/a>        d1vpasc"drivers/ata/libata-scsi.c#L1620"4id="L329s="comme3aaaa an class="comment">/3 Fopa32">atrbufa>, <ata_scsi_sear *90"4="Lpascs  t;16797/a>        ="Lpasc"+code=rca_scid_ring="nLfa href="sref">="n_scid_ri_sear *ppascs  t;ata_scs_sear *9at_blk_desc"sreid          coe"20" a> bufa>, <0,<0,<0,<0,<>, <20"/a>                 *, si3eofa href="+code=schdccla3s="sr3320" c>20" a> bufa>, <0,20"/a>                , [4], <20"/a>                SA3_QCID33);, 8
}"drivers/ata/libata-scsi.c#L1620"4id="L39">atu8a> 3"line" name="L1620" c>20"3a>   33PR" a>, ata_scs_sear *ebLef="+code=ata_scsi_see" n_controlscsi.c#L1689" ip" n_controlef="+code=ata_scsi_sesix_byt#scsi.c#L1689" isix_byt#ef=""drivers/ata/libata-scsi.c#L1620"4id="L39aaaaaaaa 3id="L1720" class="line" n3me="L33trbufa>, [32]ata_scs_sear *at2 23una3d *sp3n>
at2 23 er3lt/sp33 <atrbufa>, [32]3*  sp34>  a href="driverput_unal hri.c#L1689" isix_byt#ef=""drivers/atoe"rs/at9" cmpfa hreef="sref">90"4="Lpascs  t;90"4="Lpascco"l_nes. ass="sref">atrbufa>, [32]16993/a>3*  sp342  a href="driverput_unal hr"sref">ebLef="+code=ata_soe"!rs/at9" cmpfa hreef="sref">90"4="Lpascs  t;                 * 2    C24KIN3:16595/a>                
20" a>atu8a> 3
203/a>3* /sp342]90"4="Lpascs  t;atrbufa>, [32]  aticwitch"rs/at9" cmpfa hrlscsi.c#L1689" ip" n_controlef="+code=ata_se"a3rbufa3, </2579"3167973a>
                /2520"3c>20"3a> bufa>, <                /25">a3hdca>35> bufa>, <0,20"/a>   break;irivers/ata/libadisablenreaass="li>20"/a>                 *, si3e" name="L3659">16595/a>t2e" >/25atr3ufa>,3[4]                 *, si3enUIRYoVPD3MBC-2 (no rs/m2men>/25pag3a /sp3n>
9at_blk_desc"v49"_notuass="line" n3me="L33trbufa>, [3e"/25 nu3b<   356<0a href="drdefault:" n3me="L33trbufa>, [3e"16595/a>s2e" >/250" 3>20"/35a0>, ata_scid_rine"n,al9orslf"line" n3me="L33trbufa>, [3e"203MPC-3 (no rs/"2men>/25t">3*  sp352]
/25a h3ef="+35 </26san3et/sp36>
ppascs  t;ebLef="+code=ata_so? 8 : 0"sref">atrbufa>, [32]16696o2lin>/26t">3*  sp36> bufa>, <atrbufa>, [32]/26t">3*  sp36> bufa>, <0,20"/a>   ivers/ata/libatref">ppascs  t;ebLef="+code=ata_so? 8 : 0"sref">atrbufa>, [32]16696t2lin>/26KIN3:16696/a> m2" n>/26 nu3bersp368
90"4="Lpascs  t;atrbufa>, [32]90"4="Lpascs  t;atrbufa>, [32]/26and3*s/sp36a0"a href="drivers/ata/libatnameTclasa>                 *, si3n class="s3ring">"n"2n c>/26t">3* /sp36>
20(yet) but askc#pasi.c_all_a>                 *, si3nclass="li3class="line" a2id=>/26a h3e    36>
/26">a3rbufa36>
                 *, si3 *gt;,  *, si3 ine" name3ref">athdca> o2hdc>/27">a3r<   37> bufa>, <0,<0,<0,<0,goto*ata_scid_rine"n,al9orslf"line" n3me="L33trbufa>, [3e"/27"> 3 9">13696/a>        "noATAm2ass>/27 nu3bersp378
@2hdca>27 nu3bersp375 bufa>, <0,20"/a>   ivers/ata/libatref">ppascs  t;ppascs  t;atrbufa>, [32]Ss2CID>/2739"31639337a0>, atrbufa>, [32]/27"> 3*atrbufa>, [32]/27una3d *sp378
"n=2n c>/27 er3lt/sp37a0>, ppascs  t;ata_scid_rine" name="L167fw       hrref">ppascs  t;atrbufa>, [32]/28san3et/sp38>
atrbufa>, [32]/28t">3*  sp3n>
atrbufa>, [32]/28t">3*  sp382
1689t2"li>/2iatr3u /sp384]ppascs  t;atss="line" name="L167arppascs  t;atrbufa>, [32]atrbufa>, [32]/28PR"3a>, <38a}0a href="drivers/ata/libata-s/35id="L17203689">168983a>/2i   3     3, , /2879"31669638>
ppascs  t;ppascs  t;atrbufa>, [32]162ref">ppascs  t;ata_scid_rine" name="L167fw       hrref">ppascs  t;atrbufa>, [32]/28);38a0>, ppascs  t;atss="line" name="L167arppascs  t;atrbufa>, [32]16893/a>/29san3et/sp39>
atrbufa>, [32]3*  sp39>
atrbufa>, [32]16993/a>/29t">3*  sp392
                 *, si3  t2/29KIN3:ata_scid_rine"n,al9orslf"line" n3me="L33trbufa>, [3e"        3Ein_lock_irqsm2"> >/29pag3a /sp398
}"drivers/at" n3me="L33trbufa>, [3e"/29thd3abufa39a}0a href="drivers/ata/libata-s/35id="L17203 */29   3     3 3*bufc39>
ata_scid_rine" name)f!ref="drivers/atchingeable""sref">d1vpasc"drivers/atscid_ring="Lfa href=fla      ata_scs_sea="srDFLAG_LBA4rname)f!ref="driv/libata-scsi.c#L1620"4id="L3s2="commen3dENTIFYota3tpagesclass="a2ef=>/29   3     39a0d1vpasc"drivers/atscid_ring="Lfa href=fla      d1f_control5ccccbreak;ref">atrbufa>, [32]="n e699>/29thd /span>"drivers/a4amp; * 9">16696/a>        3clm>atl"sre))rbufclass="sref">atrbuca_scsi_sop_dev_asizeofs_fuass="line" name="Llene="commen3">/* Fopagea0x80atr4ufa>, [32]/25a h3ef="+35 </26t">3* "sref">ppascs  t;/26t">3* "sref">ppascs  t;        4a an class="commes3s3="co4men3"40ne" nam3="L1689">1689t2"li>/2iatr3u "sref">ppascs  t; * 9">16696/a>09         , , [3e"/25a >ppascs  t;89">1689t2"li>/2iatr3u "sref">ppascs  t;atida>, ata_scs_sear *S89">1689t2"li>/2iatr3u /span>
ppascs  t;ata_scs_sear *atida>, ata_scs_sear * >/29pag3a /sp398
}"drivers4ta/libata-4csi.c#L1620"4id="L3ass="c4mme3t4>/* Fonumberr omment">/2 Fopa22">atrbufa>, <} elL16       co4"sref">atr4ufa>, [32]/* Fopagea0x"line" na3e="L133          <="L162_lesref">srcef="+cv="L162_lesf="driverar);38a0>, /26t">3* "sref">ppascs  t;20"3a>   31d>        /* FoM_S-3 (no rs/o2men>/2520" c>"sref">ppascs  t;srcef="+cv="L162_lesf="drode=eef="8L1689" ip" n_controlef="+code=ata_s3e="4ta/libata-4  /26t">3* "sref">ppascs  t;srcef="+cv="L162_lesf="dL1689" ip" n_controlef="+code=ata_s3e="4t>        4code=atu8class="sr3e" nam4="L3641ne" nam3="L1689">1689t2"li>/2iatr3u "sref">ppascs  t; * 9">16696/a>09         , /25a >ppascs  t;3D41CID_PR"3class="sref">89">1689t2"li>/2iatr3u "sref">ppascs  t;atida>, ata_scs_sear * *    4 Co@rbuf: Rulpoe"23.id="L47203e41_FW_REV3lass="sref">S89">1689t2"li>/2iatr3u /span>
ppascs  t;ata_scs_sear *atida>, ata_scs_sear * *      sp@a/3..c#L1420"3141L1699" class="line" nock_irqsm2"> >/29pag3a /sp398
}"drivers4nt"> *    4 Co@rbuf: Rulpoe"23.ss="c4mme3 41/* Fonumberr ock_irqsm2"> >/29pag3a /sp398
}"drivers4nsref">atr4 Co@rbuf: Rulpoe"23.9s="c4mme3141comment">/* Fo3695513020" c>20" a> bufa>, < *    4 Co@rbuf: Rulpoe"230" c>24"/a3<42ne" name="L1620" c>20"3a>   31d>         *    4 Co@rbuf: Rulpoe"230c#L16401 3"4       /29KIN3: *    4 Co@rbuf: Rulpoe"232.c#L1420"36429">16993/a>a setvers/a=rca_scsi_sop_dev_asizeofs_fuass="line" name="L167aetich simu         *    4 Co@rbuf: Rulpoe"232" nam4="L3 42relass.3Er omment"> * 2    C24KIN3:  4L164n claK4ass="line" namline32 Fopa4ea03d42t">/* FoMBC-2 (no rs309         , 20" a>atu4a> 3<42CID_PR"3a>/29thd3abufa39a}4          4  , , 203/a>a setvers/a=rca_scsi_sop_dev_asizeofs_fuass="line" name="L167aetich simu         *    4code=atu8class="sr32ss="c4mme3l4ne" name="L162mment"> * 2    C24KIN3:  4Lsref">atr4csi.c#L1620"4id="L329s="c4mme3a42comment">/* Fo369551309         ,  >/29pag3a /sp398
}"drivers4"/29t">3*  sp39>
4          4   *4 si3e43" c>20"/a>
at_shref_caper4/ata/lascREAD CAPACITY[ 16]L1n" id="L162aMODE SENSEn6, 10
s="linespan class="comm4          4  16393/a>atu4a> 3"43CID_PR" class="sref">@2hdca>27 numbe/span>
16393/a>16393/a>20"/a> **/ata/lascREAD CAPACITYivers/ata/"line" name="L1639">16393/a> *    433trbufa>, [3e"20"/a>
atr4ufa>, [32] * 3    C32sanse  span>
  4"sref">atr4ufa>, [32]16me="L1620" c>20"/3>    32a>    /span>
aef=href_cap=rca_9" id="Li.c#L16m>at_s2#L1ss="l20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar         4      /* FoMBC-20" c>20"73>    32            atic ununsigned t csi.c#+code=rca_scsi_sop_dev.c#pascsi_sear *d1vpascs  t;16797/a>        d1vpasc"drivers/4name="L1624" c>20" a>atu4a> 3<44ne" name="L1620" c>20"3a>   3code=atu8cl="+codename="L20" c>20"3a>   atut_lb0d1f_nverctor">d1vpascs  t; * 2    C24KIN3:
L16the rtut0<>, <<3rs/ata/libadisablenrea"n,al9oia"lr ontrt*/a>  4"a/libata-4  /u  , atccccccgoto*atscid_mment"> * 2    C24KIN3:ata3e ers/ata/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  4a href="dr4vers/ata/libata-sc25e" na4e="31420" c>203/a>, [32]d1vpasc"drivers/4nt"> *    4ufa>, [32]d1vpasc"drivers/4n " n3me="4code=atu8class="sr2aaaaaa4aa 3d44ch simuted ATSI R/nmd=2eti>/28);, 4<4          4  , atccccccgoto*atscid*atccccccgoto*at=rca_scsi_sop_dev_asrs/atchingeablontrol_me" nd1f_  d1vpasc"drivers/4          4  d1f_  d1vpasc"drivers/4 sref">atr4  16993/a>atrrop_163rogical_=rctor_offsec=rca_scsi_sop_dev_asrs/atchingeablontrol_me" nd1f_  d1vpasc"drivers/4          4   *4 si3e45name="L3"L1669">16696t2lin>/26KIN3: *4 si3e45ame="L1369">16696/a> m2" n>/23 er3lt/sp33 </29thd3abufa39a}4t:" n3me="433trbufa>, [3e""line" n"2d=">/21"> 90"4="Lpascs  t;16797/a>        ="Lpasc"+code=rca_scid_rcmpfa hreef="sref">90"READ_CAPACITY"Lpasc"+code=rcREAD_CAPACITY8 +ephrs/at9" cmpfa hrl89" ipgef="+code=ata_s4ne" n3me="433trbufa>, [3e"atut_lb0atar/25atr3ufa>,3[4]20"/a>  4"sref">atr4ufa>, [32]/* FoM_S-3 (no rs/o2men>/2520" c>"sref">ppascs  t; *ringeef="(8 * 3p class="s49"ER\nemcp sp |amp;crbufclass4oeref">atr4ufa>, [32]/26t">3* "sref">ppascs  t; *ringeef="(8 * 2p class="s49"ER\nemcp sp |amp;crbufclass4o         4ufa>, [32]1689t2"li>/2iatr3u "sref">ppascs  t; *ringeef="(8 * c#L1689" ip" n_controlef="+code=ata_s3e="4"/2iatr3u "sref">ppascs  t; L1689" ip" n_controlef="+code=ata_s3e="4"e" n3me="4ufa>, [32]/29thd3abufa39a}4"sref">atr4ufa>, [32]S/2e" >/25atr3ufa>,3[4]ataa/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  4"e" n3me="4   *4 si3n46lass="s3IRYoVPD pagea"2mut>/2879"316"sref">ppascs  t;atccccccgoto*atscid*ringeef="(8 * 3p class="s49"ER\nemcp sp |amp;crbufclass4oppascs  t;atccccccgoto*atscid*ringeef="(8 * 2p class="s49"ER\nemcp sp |amp;crbufclass4o " n3me="4   *4 si3n46f="_LEs       h5cc3mp;ppascs  t;atccccccgoto*atscid*ringeef="(8 * c#L1689" ip" n_controlef="+code=ata_s3e="4          4   *4 si3 47ode=tfT3PE_DIS class=/2"+c>/26san3et"sref">ppascs  t;atccccccgoto*atscid_1689" ip" n_controlef="+code=ata_s3e="4 sref">atr4   *4 si3 4ne" name3ref">omment">/2 Fopa22">atrbufa>, <} elL16       co4ne" n3me="433trbufa>, [3e"/25atr3ufa>,3[4]20"/a>  4a>        4a an class="commes2 urn 14 st3e47ne" nam3="L1689">1689t2"li>/2iatr3u "sref">ppascs  t; *ringeef="(8 * 7#L1689" ip" n_controlef="+code=ata_s3e="4 /2iatr3u "sref">ppascs  t; *ringeef="(8 * 6#L1689" ip" n_controlef="+code=ata_s3e="4 e" n3me="433trbufa>, [3e"@2hdca>27 nu3be"sref">ppascs  t; *ringeef="(8 * 5#L1689" ip" n_controlef="+code=ata_s3e="4 sref">atr4ufa>, [32]St2"li>/2iatr3u "sref">ppascs  t; *ringeef="(8 * 4#L1689" ip" n_controlef="+code=ata_s3e="4 e" n3me="4ufa>, [32]/2879"316"sref">ppascs  t; *ringeef="(8 * 3p class="s49"ER\nemcp sp |amp;crbufclass4"sref">atr4ufa>, [32]ppascs  t; *ringeef="(8 * 2p class="s49"ER\nemcp sp |amp;crbufclass4 :" n3me="433trbufa>, [3e""n=2n c>/27 er3lt"sref">ppascs  t; *ringeef="(8 * c#L1689" ip" n_controlef="+code=ata_s3e="4"sref">atr4ufa>, [32]/26san3et"sref">ppascs  t; L1689" ip" n_controlef="+code=ata_s3e="4k;ref">atr4ufa>, [32]/28t">3*  sp3n>
4a ref">atr4ufa>, [32]/25atr3ufa>,3[4]ataa/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  4 :" n3me="433trbufa>, [3e"1689t2"li>/2iatr3u "sref">ppascs  t;atccccccgoto*atscid*ringeef="(8 * 3p class="s49"ER\nemcp sp |amp;crbufclass4"sref">atr4ufa>, [32]/2iatr3u "sref">ppascs  t;atccccccgoto*atscid*ringeef="(8 * 2p class="s49"ER\nemcp sp |amp;crbufclass4k;ref">atr4ufa>, [32]@2hdca>27 nu3be"sref">ppascs  t;atccccccgoto*atscid*ringeef="(8 * c#L1689" ip" n_controlef="+code=ata_s3e="4a href="dr4vers/ata/libata-s/35id="L47203648_FW_REV3lass="sref">St2"li>/2iatr3u "sref">ppascs  t;atccccccgoto*atscid_1689" ip" n_controlef="+code=ata_s3e="4s:" n3me="433trbufa>, [3e"/27"> 3*atr4ufa>, [32]ppascs  t;20" a> bufa>, <atr4ufa>, [32]/28ppascs  t;d1vpasc"drivers/4"sref">atr4ufa>, [32]16893/a>/28ppascs  t;aowd="_al c>2020scid*ode=eef="8)code=eef="sref">90"4="Lpascs  t;atr4ufa>, [32]/* FoM_S-3 (no rs/o2men>/2520" c>"sref">ppascs  t;2020scid_ringd1vd1vpasc"drivers/4a ref">atr4ufa>, [32]/27"> 3 9">136964          4   *4 si3<4pan clas3="comment">  "line" n"2d=">/21"> 3*bid_has_trimcbreak;ref">atrrop_163has_trim=rca_scsi_sop_dev_asizeofs_fuass="line" name="L167aetich simu        /28ppascs  t; * 2    C24KIN3:20"/a>  4at" n3me="433trbufa>, [3e"/29thd3abufa39a}4a href="dr4vers/ata/libata-s/35id="L47203 49_FW_REV3lass="sref">Sment">  "line" n"2d=">/21"> 3*bid_has_zero_after_trimcbreak;ref">atrrop_163has_zero_after_trim=rca_scsi_sop_dev_asizeofs_fuass="line" name="L167aetich simu        /29thd3abufa39a}4a:" n3me="4csi.c#L1620"4id="L3s2="co4men3d49lass="s3IRYoVPD pagea"line" npan clas=2eti>/28ppascs  t; * 2    C24KIN3:20"/a>  4asref">atr4csi.c#L1620"4id="L3s2="co4men3d4NTIFYota3tpagesclaaaaaock_irqsm2"> >/29pag3a /sp398
}"drivers4>="n e699>429thd /span>"drivers/a4am4; >/29pag3a /sp398
}"drivers5_dev_asize5fs_fuass="line" name="Lle5e="co5men3">/* Fopagea0x80atr5ufa>, [32]20" a> bufa>, < >/29pag3a /sp398
}"drivers5_3/libata-5c  *5men3"50name="L3"L1669">16696t2lin>/26KIN3:, [3e", [3e"@2hdca>27 numba#L16m>aef=hrs/at_lunser4/ata/lascREPORT LUNSivers/at numberspan>
  a href="drivers/ata/libata-scsi.c#L1649" id="L1629" class="line" name="L1639">16393/a>20"/a> **e/span>
16393/a>
atr5ufa>, [32]20"/a>16393/a> * 3    C3"line" name="L1639">16393/a>atr5vers/ata/libata-s/3.c#L16501 3d51       REin_lock_irqsa3e(hos31 erul
20"/a>, <_irqhref(host >,         5code=atu8class="sr3e" nam5="L3651a href="+code=scrbufcl3ss="s3/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  5"20"/3>    32a>    /span>
atrrop_a href=hrs/at_luns=rca_9" id="Li.c#L16m>at_s2#L1ss="l20"2a>  atic ununsigned t ata_scsi_sop_inq_8/a>  sruct ata_scsi_sear *atar3D51CID_Prs/at9" cmpfa hrl89" ipgef="+code=ata_s5nt"> *    5 Co@rbuf: Rulpoe"23.id="L57203e51_FW_REV3lass=si_sear *      sp@a/3..c#L1520"31510" c>203/a>ppascs  t;ment"> * 2    C24KIN3:at 8 ers/ata/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  5nt"> *    5 Co@rbuf: Rulpoe"23.ss="c5mme3 51ass="li3e" name="L165a2 cl>/25a h3ef="+35>
5nsref">atr5 Co@rbuf: Rulpoe"23.9s="c5mme3151comment">/* Fo3695513020" c>20" a> bufa>, < *    5 Co@rbuf: Rulpoe"230" c>25"/a3<52ass="ock_irqsm2"> >/29pag3a /sp398
}"drivers5nt"> *    5 Co@rbuf: Rulpoe"230c#L16501 3"52ode=scr3/aion/class="o2"+c>/28t">3*  sp3n>
5nt"> *    5 Co@rbuf: Rulpoe"232.c#L1520"36529">16me="L16void"Li.c#L16m>at_s2#L1pi_#+codeeiiiie+35 < * *atar *    5 Co@rbuf: Rulpoe"232" nam5="L3 52relasrs/at9" cmpfa hrl89" ipgef="+code=ata_s5L164n claK5ass="line" namline32 Fopa5ea03d52t">/* FoMBC-2"line" n"2d=">/21">q_scs_sear * *<167aetich simu      err_maskscs_sear *q_scs_sear * *<167aetich simu      err_maskscs_sear * * *20" a>atu5a> 3<52CID_PR"3class="sref">@ent"> * 2    C24KIN3: theliba clas"+cogth:"512 byt#s 41620" c>20"/a>  5          5  oliba clas"+cogth:"512 byt#s 41620" c>20"/a>  5 lass="com5"+code=atu8class="3aaaaaa5aa 3n52lass="s3ring">"n"2n c>/26t">3* tttttttt* a #+cod lk_driptor"ef">nhrethat's onlyliba clas"+cogth:"512 byt#s 41620" c>20"/a>  5 t"> *    5code=atu8class="sr32ss="c5mme3l52ass="li3class="line" a2id=>/26a h3e tttttttt* corred="an cATA,6_deiATAPIliba clas"+cogth:"512 byt#s 41620" c>20"/a>  5 sref">atr5csi.c#L1620"4id="L329s="c5mme3a52ref="+c3abl//(RMB) bi=2si.>/26">a3rbtttttttt*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  5ta/libata-5csi.c#L1620"4id="L39id="L57203 539">16893/a>/28 * *20" a> bufa>, <o20" c>20" a> bufa>, < *    5   *5 si3e53"L1679"3class="line" "2id=>/27"> 3 9">136965          5  203/a> * *<167aetich simu       9">dontccccccgoto*dont=rca_scsi_sop_dev_asq_scs_sear * *<167aetich simu       9">ispgef=""drivers/atf="+codrefa020" c>20" a> bufa>, <16696/a> m2" n>/#L1sqc_freata/libata-scsi.c#L1qc_frea=rca_scsi_sop_dev_asq_scs_sear * *20" a> bufa>, <atu5a> 3"53CID_Po20" c>20" a> bufa>, <20" a> bufa>, <20"/a>lesss/atp>20er PIO"an c"+codesafetycreasons"+code?t*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  5tt"> *    533trbufa>, [3e" *atar, [3e"rs/at9" cmpfa hrl89" ipgef="+code=ata_s5"sref">atr5ufa>, [32]16893/a> *d1vpasc"drivers/atscid_ring="Lfa href=fla       * *20" a> bufa>, <20" a> bufa>, <atr5ufa>, [32]/27"> 3 9">136965          5  at_s2#L1pi_requestvers/ata/libata-scsi.c#Lpi_requestvers/a=rca_9" id="Li.c#L16m>at_s2#L1squeued_  atar         5      /*rs/at9" cmpfa hrl89" ipgef="+code=ata_s5"ame="L1625" c>20" a>atu5a> 3<54ne" name="L169" id="Li.c#L16m>at_s2#L1ss/atf+= igned t csi.c#+p/at="+code=rca_scsi_sop_ipta/libata-scsi.cp> */28 * *<167aetich simu      ipta/libata-scsi.cp> *<020" c>20" a> bufa>, <="Lpasc"+code=rct =="+code=rca_scsi_sop_  ispgef=""drivers/atf="+codref020" c>20" a> bufa>, </27"> 3* *    5ufa>, [32]/28);, 4<5          5  ent"> * 2    C24KIN3:20"/a>  5          5  atrmemsec=rca_scsi_sop_dev_as    srL169_SENSE_BUFFERSIZEccccccgoto* *20" a> bufa>, <atr5  /27"> 3 9">136965          5   *5 si3e55name=#ifdefsop_inq_8/a>  srCONFIG_a hrSFFccccccgoto*/27"> 3 9">136965          5   *5 si3e55t">/* FoMBC-2"line" n"2d=">/21">ipta/libata-scsi.cp> * *atar, [3e"@2hdca>27 nu3beipta/libata-scsi.cp> * *ipta/libata-scsi.cp> *<,g="Lfa=2eti>/28 * *<167aetich simu      tef">ppascs  t; *20" a> bufa>, <20" a> bufa>, <, [3e"/27"> 3* * 2    C24KIN3:20"/a>  5  " n3me="533trbufa>, [3e"20" a> bufa>, <, /28 * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srefea695ata/libata-scsi.fea695a_ring=de=eef="tl"sre))rbufclass="sref">atrbuca_scsi_so5"sref">atr5ufa>, [32]/28t">3*  sp3n>
5oeref">atr5ufa>, [32]16993/a> * *20" a> bufa>, <16696t2lin>/26KIN3:/25atr3ufa>,3[4]20"/a>  5"e" n3me="5ufa>, [32]20"3a>   sg_init_ontccccccgoto*/28 * *<167aetich simu      sgecccbreak;ref">atrsgeccscsi_sop_inq_8/a>  sr    srL169_SENSE_BUFFERSIZEccccccgoto* *20" a> bufa>, <atr5ufa>, [32]/28 * *<167aetich simu      sgecccbreak;ref">atrsgeccscsi_sc#L1689" ip" n_controlef="+code=ata_s3e="5"e" n3me="5   *5 si3n560" c>203/a> * *<167aetich simu      dma_dirscs_sear */2820" a> bufa>, < *5 si3n56ass="li3e" name="L165a2 cl>/25a h3ef="+35>
5o " n3me="5   *5 si3n569h simu3ed ATSI R/nmdn2 oputmemseccbreak;ref">atrmemsec=rca_="Lfa=2eti>/28 * *<167aetich simu      cdba href="+code=rcdbscsi_s0_sop_inq_8/a>  srq_scs_sear * *<167aetich simu      ds/atchingeablontrol_me" nd1f_cdb_lesref">srcef="+cvcdb_les> *20" a> bufa>, </2820" a> bufa>, <atr5   *5 si3 57ch simu3ed ATSI R/nmdn2 oputq_scs_sear * *<167aetich simu      cdba href="+code=rcdbscsic4erad=2eti>/28 *<020" c>20" a> bufa>, <atr533trbufa>, [3e"/27"> 3 9">136965a>        5a an class="commes2 urn 15 st3e573" c>203/a> * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sref">d1vpasc"drivers/atscid_ringef=; * *<020" c>20" a> bufa>, <16696/a> m2" n>/q_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srevers/ata href="+code=rcers/at nidrad=2eti>/2820" a> bufa>, </29thd3abufa39a}5 sref">atr5ufa>, [32] 3*bpio_uodesillef+= igned t csi.c#+pio_uodesille=rca_e=rca_scsi_sop_ipta/libata-scsi.cp> */2879"316q_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sreprotocolf">ppascs  t;/28 * *<020" c>20" a> bufa>, <, [32]ppascs  t; *<.9" cmpfa hr"srefea695ata/libata-scsi.fea695a_ringef=; * *<020" c>20" a> bufa>, </2 Fopa22">atrbufa>, <} elL16       co5"sref">atr5ufa>, [32]/26san3etq_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sreprotocolf">ppascs  t;/28 * *<020" c>20" a> bufa>, <atr5ufa>, [32]/* FoM_S-3 (no rs/o2men>/2520" c>q_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srelbamcbreak;ref">atrlbam nidrad=2eti>/28 *<020" c>20" a> bufa>, <atr5ufa>, [32]/2520" c>q_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srelbahcbreak;ref">atrlbah nidrad3020" c>20" a> bufa>, <20" a> bufa>, <atr5ufa>, [32]16696/a> m2" n>/q_scs_sear * *<167aetich simu      ners/ascs_sear */28 *<020" c>20" a> bufa>, </29thd3abufa39a}5a href="dr5vers/ata/libata-s/35id="L57203658_FW_REV3lass=si_sear * *<167aetich simu      ciiiie+3_fsref">srcef="+cvciiiie+3_fs nidrad=2eti>/2820" a> bufa>, </27"> 3*atr5ufa>, [32] * *20" a> bufa>, <atr5ufa>, [32]atr5ufa>, [32]atr5ufa>, [32]20" a> bufa>, <atr5ufa>, [32]/27"> 3 9">136965          5   *5 si3<59relasme="L16void"Li.c#L16m>at_s2#L1pi_qc_eiiiie+35 < * *atar, [3e"/*rs/at9" cmpfa hrl89" ipgef="+code=ata_s5at" n3me="533trbufa>, [3e"="Lpasc"+code=rct =="+code=rca_scsi_sop_  ispgef=""drivers/atf="+codref020" c>20" a> bufa>, <20"/3>    32a>    /spaerr_maskscs_sear */28 * *<167aetich simu      err_maskscs_sear *20" a> bufa>, </27"> 3*atr5csi.c#L1620"4id="L3s2="co5men3d598clas8u3scsi.pan class2"comm23 er3lt/sp33 <atr529thd /span>"drivers/a4am5;/28);, 4<6_dev_asize6fs_fuass="line" name="Lle6e="co60=atrs/a3on/cl>ent"> * 2    C24KIN3:20"/a>  6"sref">atr6ufa>, [32]unlikelef+= igned t csiunlikele=rca_scsi_sop_dev_asq_scs_sear * *<167aetich simu      ipta/libata-scsi.cp> * *20"/a>  6"2ref">atr6ufa>, [32] * * *<167aetich simu      f">d1vpasc"drivers/atscid_ring="Lfa href=fla      16696t2lin>/26KIN3:, [3e" * *<167aetich simu      f">d1vpasc"drivers/atscid_ring="Lfa href=fla      /a3on/cl>ent"> * 2    C24KIN3: theliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6t6        6aers/ata/libata-s/35id="L67203 60ch simuted ATSI R/nmdn3 oputtttttttttttttttttttttttt* trans/laion
L16taskfilscregisble:6/3>o aliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6t7        6asi.c#L1620"4id="L3s2="co67203 600" c>20"/a>nhrethat's onlyliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6ta/libata-6csi.c#L1620"4id="L3ass="c6mme3t60  atRurn 1s ATA iice20"/a>  6"sref">atr6ufa>, [32]20"/a>20"/a>  6ta/libata-6csi.c#L1620"4id="L3720" c6ass3"61"L1669"3class="line" /a3on/cl>i.c#L16m>at_s2#L1sgen_pL16thruvers/ata/libata-scsi.c#L1gen_pL16thruvers/a=rca_scsi_sop_dev_asq_scs_sear * *20" a> bufa>, <atr6vers/ata/libata-s/3.c#L16601 3d61t">/* FoM_S-3 (no rs/o20" c>20" a> bufa>, </27"> 3 9">136966t>        6code=atu8class="sr3e" nam6="L3661ne" nam3="L1689">1689tent"> * 2    C24KIN3:, , <20"/sliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6t4        6code=atu8class="sr3e Fopa6ea03N61L1720" class="line" na3e="Lttttttttttttttttt* #+t.  Some+imes don c>, <oliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6c#L1609" i6="L1639" class="l/3.comme6t">3D61CID_PR" class="sref">@2hdca>tttttttttttttttt* fail,"an cexaiiie,lwhen6_d media6<:6prelass=  Th/sliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6t6        6 Co@rbuf: Rulpoe"23.id="L67203e61ch simuted ATSI R/nmdn3 oputtttttttttttttttt* creas/atac>,oper4/1699EH
issuas don c>, <20"/a>  6t7        6ent"> *      sp@a/3..c#L1620"3161lass="s3ring">"n"2n c>/26t">3* tttttttt* fails i.c#get:6/3vo<20"agains/atacquire #+cod l0" liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6ta/libata-6 Co@rbuf: Rulpoe"23.ss="c6mme3 61ass="li3class="line" a2id=>/26a h3e tttttttt* an cthe fail20"vers/at="line" name="L1639">16393/a>atr6 Co@rbuf: Rulpoe"23.9s="c6mme3161ref="+c3abl//(RMB) bi=2si.>/26">a3rbtttttttt*"line" name="L1639">16393/a> *    6 Co@rbuf: Rulpoe"230" c>26"/a3<62an class="comment"> * 3    C26a h3e tttttttt* If don c>, <, <20">oliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6nt"> *    6 Co@rbuf: Rulpoe"230c#L16601 3"62       REin_lock_irqsa3e(hos26a h3e tttttttt* avoid"th<:6infinitec>,op="line" name="L1639">16393/a> *    6 Co@rbuf: Rulpoe"232.c#L1620"3662" c>20"/a>a3rbtttttttt*"line" name="L1639">16393/a>20"/a>  6L164n claK6ass="line" namline32 Fopa6ea03d62L1720" class="line" na3e="Lttttttttttttttttt* #u e4qc167aedev167aesdevo/sn't NULL6bean e4der20erencing="line" name="L1639">16393/a>20" a>atu6a> 3<62CID_PR" class="sref">@2hdca>tttttttttttttttt*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6          6  S"line" n"2d=">/21">q_scs_sear * *<167aetich simu      cdba href="+code=rcdbscsicmpfaad=2eti>/28  srq_scs_sear * *<167aetich simu      ds/atchingeablontrol_me" nd1f_sds/atchingeablontrsol_me" a href="+code=scaratar  srq_scs_sear * *<167aetich simu      ds/atchingeablontrol_me" nd1f_sds/atchingeablontrsol_me" nd1f_>, <20cbreak;ref">atrl, <20 nidrad3020" c>20" a> bufa>, < *    6code=atu8class="sr32ss="c6mme3l62ass="li3e" name="L165a2 cl>/25a h3ef="+35>
6 sref">atr6csi.c#L1620"4id="L329s="c6mme3a62ref="+c3ed ATSI R/nmd=2eti>/28 * *<167aetich simu       9">ispgef=""drivers/atf="+codref167aetich simu      relulccbreak;ref">atrrelulc nidrad=2eti>/2820" a> bufa>, <16893/a>/28 * *<167aetich simu       9">dontccccccgoto*dont=rca_scsi_sop_dev_as  20" a> bufa>, </* FoM_S-3 (no rs/o2men>/2520" c>aL1sqc_freata/libata-scsi.c#L1qc_frea=rca_scsi_sop_dev_asq_scs_sear * *20" a> bufa>, < *    6   *6 si3e63"L1649"3PC-3 rs/aionlo36955020" c>20" a> bufa>, <        6  20" a> bufa>, <20" a> bufa>, <atu6a> 3"63ne" name="L1622e" >/25atr3ufa>,3[4]20"/a>  6"         6csi.c#L1620"4id="L39uffec6oto3d63_FW_REV3lass="line" n"2d=">/21">unlikelef+= igned t csiunlikele=rca_scsi_sop_dev_aserr_maskscs_sear * * */2879"316  atrrelulc nidrad=2eti>/2820" a> bufa>, < *    633trbufa>, [3e"20" a> bufa>, <atr633trbufa>, [3e"20" a> bufa>, <atr6ufa>, [32]16893/a>unlikelef+= igned t csiunlikele=rca_scsi_sop_dev_aserr_maskscs_sear */* FoM_S-3 (no rs/oent"> * 2    C24KIN3: theliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6"sref">atr6ufa>, [32]20"/a>a3rbtttttttt* trans/laion
L16taskfilscregisble:6/3>oliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6          6  nhrethat's onlyliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6>         6      20"/a>  6"ame="L1626" c>20" a>atu6a> 3<64CID_PR" class="sref">@2hdca>tttttttttttttttt*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6a         6  S>i.c#L16m>at_s2#L1sgen_pL16thruvers/ata/libata-scsi.c#L1gen_pL16thruvers/a=rca_scsi_sop_dev_asq_scs_sear * *20" a> bufa>, <16893/a> *    6ufa>, [32]ispgef=""drivers/atf="+codrefrad=2eti>/28="Lpasc"+code=rcf">=="+c020" c>20" a> bufa>, <atr6code=atu8class="sr2aaaaaa6aa 3d64ch simuted ATSI R/nmd=2eti>/28);, 4<6          6  16893/a>ispgef=""drivers/atf="+codrefcmpfaad=2eti>/28 * 9">ispgef=""drivers/atf="+codrefc1]code=eef=03afa h0iphrs/at9" cmpfa hrl89" ipgef="+code=ata_s6          6  /* FoM_S-3 (no rs/////////20" c>20"longd=2eti>/28d1vpasc"drivers/atscid_rin020" c>20" a> bufa>, <atr6  /28>fl3gppascs  t;20" a> bufa>, <16696t2lin>/26KIN3: *6 si3e65="strin3lass="line" nlllllvana2DEN>/28>fl3gppascs  t;/28  atic ununsigned t /28d1vpasc"drivers/atscid_rina020" c>20" a> bufa>, </29thd3abufa39a}6          633trbufa>, [3e" * 2    C24KIN3:20"/a>  6 lass="com633trbufa>, [3e""n"2n c>/26t">3* * i.c#some+imes d a lascfrom the spec WRT hra href=l0" liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6s/26a h3e * an mas=  If4/1699ass@iono/s hrs/at20"as zero like6_d mal,liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6 sref">atr633trbufa>, [3e"/26">a3rb* then we makecthe followingdfixups:  1) FakecMMC-59ass@ion,liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6t * * 3    C26a h3e *s/atindL1aasc/atthe Linux >20" midlayer"th<:6iatacms3arnliba clas"+cogth:"512 byt#s 41620" c>20"/a>  6t         6ufa>, [32]20"/a>  6tsref">atr6ufa>, [32]20"/a>a3rb* arrealwayscoorred=="line" name="L1639">16393/a>20"/a>  6"sref">ppascs  t;/a3on/cllllllvana2DEN>/28>fl3gppascs  t;20" a> bufa>, <atr6ufa>, [32]S/a3on/cllllllvana2DEN>/28>fl3gppascs  t;20" a> bufa>, <20" a> bufa>, < *6 si3n66ass="li3e" name="L165a2 cl>/25a h3ef="+35>
6o " n3me="6   *6 si3n66ref="+c3ed ATSI R/nmdlllllvana2DEN>/28>fl3g  atic ununsigned t /28d1vpasc"drivers/atscid_rina020" c>20" a> bufa>, <16893/a>20" a> bufa>, <atr6   *6 si3 67ode=scr3/aion/class="o2"+c>/28t">3*  sp3n>
6 eref">atr633trbufa>, [3e"/2520" c>  atrrelulc nidrad=2eti>/2820" a> bufa>, <20" a> bufa>, <20" a> bufa>, <20"3a>   q_scs_sear * *<167aetich simu       9">dontccccccgoto*dont=rca_scsi_sop_dev_as  20" a> bufa>, <atr6ufa>, [32]20" a> bufa>, <20" a> bufa>, <, [32]i31 numberspan>
20"/a>at PACKET6taskfils numberspan>
atr6ufa>, [32] * 3    C31 erul@qc:a-scsi.c#9" id=u e4/atbe#initial>att numberspan>
atr6ufa>, [32]
atr6ufa>, [32]20"/a>
, <_irqhref(host >, atr6ufa>, [32]@2hdca>31 erulRETURNS
atr6vers/ata/libata-s/35id="L67203668ch simuted ATSI R/nmdn3 oput31 erulZero on huccess,6_dn-zero on failu e="line" name="L1639">16393/a>"n"2n c>/*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  6"sref">atr6ufa>, [32]20"/3>    32a>    /span>
pi_xlasta/libata-scsi.c#Lpi_xlas=rca_9" id="Li.c#L16m>at_s2#L1squeued_  ataratr6ufa>, [32]rs/at9" cmpfa hrl89" ipgef="+code=ata_s6"sref">atr6ufa>, [32]="Lpasc"+code=rct =="+code=rca_scsi_sop_sispgef=""drivers/atfa_scidrad=2eti>/28 * *<167aetich simu       9">ispgef=""drivers/atf="+codref020" c>20" a> bufa>, <atr6ufa>, [32]/28 * *<167aetich simu      ds/atchingeablontrol_me" 020" c>20" a> bufa>, <atr6ufa>, [32]    32a>    /spanol0" atchingeablontrnol0" me" radne" n"2d=">/21"> 9spgef=""drivers/atfa_scid167aetich simu       9_d#L1s ired=iongef=""drivers/atf_d#L1s ired=ionme" raad=2eti>/28 *20" a> bufa>, <    32a>    /spausing+piot     /spanol0" atchingeablontrnol0" me" roring="Lfa htich simu      ds/atchingeablontrol_me" 167aetich simu      f">d1vpasc"drivers/atscid_ring="Lfa href=fla       * *20" a> bufa>, <atr633trbufa>, [3e"20"/3>    32a>    /spaners/ascs_sear *20" a> bufa>, </29thd3abufa39a}6a href="dr6vers/ata/libata-s/35id="L67203 69_FW_REV3lass=si_searatrmemsec=rca_scsi_sop_dev_asq_scs_sear * *<167aetich simu      cdba href="+code=rcdbscsi_s0_sop_inq_8/a>  srds/atchingeablontrol_me" nd1f_cdb_lesref">srcef="+cvcdb_les> *20" a> bufa>, <203/a> * *<167aetich simu      cdba href="+code=rcdbscsi_se" n"2d=">/21"> 9spgef=""drivers/atfa_scid167aetich simu      f">="Lpasc"+code=rcf">=="+c_se" n"2d=">/21"> 9spgef=""drivers/atfa_scid167aetich simu      f"d_lesref">srcef="+cvc"d_les> *20" a> bufa>, <atr6csi.c#L1620"4id="L3s2="co6men3d69ass="li3e" name="L165a2 cl>/25a h3ef="+35>
6ksref">atr629thd /span>"drivers/a4am6; * *<167aetich simu      ciiiie+3_fsref">srcef="+cvciiiie+3_fs nidrad=2eti>/2820" a> bufa>, <20" a> bufa>, < * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sref">d1vpasc"drivers/atscid_ringef=; * *<020" c>20" a> bufa>, <atr7ufa>, [32] 9spgef=""drivers/atfa_scid167aetich simu       9_d#L1s ired=iongef=""drivers/atf_d#L1s ired=ionme" raad=2eti>/28 *1689tI R/nmdn2 oputq_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sref">d1vpasc"drivers/atscid_ringef=; *<020" c>20" a> bufa>, <, [3e"/28, [3e"20" a> bufa>, <20" a> bufa>, <203/a> * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srevers/ata href="+code=rcers/at nidrad=2eti>/2820" a> bufa>, < *<.c#+qc=sec_pc_ners/a=rca_scsi_sop_dev_asq_scs_sear * *20" a> bufa>, <atr7ufa>, [32]ent"> * 2    C24KIN3:20"/a>  7tsref">atr7vers/ata/libata-s/3.c#L16701 3d71 lis /of inqu"lin!   32a>    /spanol0" atchingeablontrnol0" me" roring="Lfa !   32a>    /spausing+piot   sr#L1pi_che <_dm atchingeablontr#L1pi_che <_dm =rca_scsi_sop_dev_asq_scs_sear * *atar/2520" c>using+piot 20" a> bufa>, <16696t2lin>/26KIN3:/25atr3ufa>,3[4]20"/a>  7t5        7="L1639" class="l/3.comme7t">3D71CID_PR" class="sref">@2hdca>tttttttt* trans0ers >o do me="e machss= i.c#FIFO managemass=  Thus ws numberspan>
20"/a>  7t7        7ent"> *      sp@a/3..c#L1720"3171lass="s3ring">"n"2n c>/26t">3* * effed=ively meaningless="line" name="L1639">16393/a>/26a h3e */liba clas"+cogth:"512 byt#s 41620" c>20"/a>  7tsref">atr7 Co@rbuf: Rulpoe"23.9s="c7mme31719h simu3ed ATSI R/nmdn2 oputners/ascs_sear */28 *<.c#+qc=raw_ners/a=rca_scsi_sop_dev_asq_scs_sear * *20"/3>)63 * 1024a020" c>20" a> bufa>, < *    7 Co@rbuf: Rulpoe"230" c>27"/a3<72=atrs20" c>20" a> bufa>, < *    7 Co@rbuf: Rulpoe"230c#L16701 3"721"strin3lass="2e" >/25atr3ufa>,3[4]at don'tliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7nt"> *    7 Co@rbuf: Rulpoe"232.c#L1720"3672" c>20"/a>a3rb* behav= iccordingd/atthe spec when6odd chunk s>at a/libliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7n>        7 Co@rbuf: Rulpoe"232" nam7="L3 72a href="+code=scrbufcl3ss="s26a h3e * matchestthe trans0er length6iatspecified=  If4the number ofliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7n4        7ass="line" namline32 Fopa7ea03d72L1720" class="line" na3e="Lttttttttt* brs/ad/attrans0er iat2n+1=  Accordingd/atthe spec,lwhatliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7n5        7" c>20" a>atu7a> 3<72CID_PR" class="sref">@2hdca>tttttttt* should happen6iss/atindL1aasc/hatt2n+16issgoingd/atbs numberspan>
20"/a>  7 lass="com7"+code=atu8class="3aaaaaa7aa 3n72lass="s3ring">"n"2n c>/26t">3* * padding="line" name="L1639">16393/a> *    7code=atu8class="sr32ss="c7mme3l72ass="li3class="line" a2id=>/26a h3e *"line" name="L1639">16393/a>atr7csi.c#L1620"4id="L329s="c7mme3a72ref="+c3abl//(RMB) bi=2si.>/26">a3rb* In prad=ice,eth<:6doesn't happen=  ATAPI   a hrs firstliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7ta/libata-7csi.c#L1620"4id="L39id="L77203 73an class="comment"> * 3    C26a h3e *sindL1aasca.c#trans0er 2n brs/ada.c#then6indL1aasca.cliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7tt"> *    7code=atu8class="sr3i.c#L172033i73       REin_lock_irqsa3e(hos26a h3e * trans0er 2 brs/adwherrethe TSIt brs/ /s padding="line" name="L1639">16393/a> *    7   *7 si3e73" c>20"/a>a3rb*"line" name="L1639">16393/a>        7  20"/a>  7"164n claK7  16393/a>atu7a> 3"73CID_PR" class="sref">@2hdca>tttttttt* These controllers us/ ictual number of trans0err20"brs/ad/a"line" name="L1639">16393/a>"n"2n c>/26t">3* * controller pushcDMA6pointer br 4n+4 brs/adbecaus/ SATA=l0" liba clas"+cogth:"512 byt#s 41620" c>20"/a>  7tt"> *    733trbufa>, [3e"/26a h3e * FIS/adarreal c>20"/at4 brs/a=  Th/s caus/s=l0"  oorrupsionliba clas"+cogth:"512 byt#s 41620" c>20"/a>  7"sref">atr733trbufa>, [3e"/26">a3rb* a.c#buf0er o2 brun="line" name="L1639">16393/a>atr7ufa>, [32] * 3    C26a h3e *"line" name="L1639">16393/a> *    7vers/ata/libata-s/3.c#L16701 3e74       REin_lock_irqsa3e(hos26a h3e * Alwayscsettingcnbrs/ad/ate16n number solvestth<:6problem"line" name="L1639">16393/a> *    7ufa>, [32]20"/a>a3rb*dbecaus/ then6ATAPI   a hrs don't hav= to #plit=l0"  att2n"line" name="L1639">16393/a>        7  16393/a>20"/a>  7"ame="L1627" c>20" a>atu7a> 3<74CID_PR"3class"line" n"2d=">/21">ners/ascs_sear *atarS>i.c#L16m>at_s2ners/ascs_sear *20" a> bufa>, </27"> 3* *    7ufa>, [32] * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srelbamcbreak;ref">atrlbam nidradne" n"2d=">/21">ners/ascs_sear *20" a> bufa>, <atr7code=atu8class="sr2aaaaaa7aa 3d749h simu3ed ATSI R/nmdn2 oputq_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srelbahcbreak;ref">atrlbah nidradne" n"2d=">/21">ners/ascs_sear *20" a> bufa>, <20" a> bufa>, <nol0" atchingeablontrnol0" me" a href="+code=scarataratr7   * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sreprotocolf">ppascs  t;/2820" a> bufa>, <using+piot atar *7 si3e75="strin3lass="line" nSI R/nmdn2 oputq_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sreprotocolf">ppascs  t;/28 * *<020" c>20" a> bufa>, <S>2e" >/25atr3ufa>,3[4]20"/a>  7 lass="com733trbufa>, [3e"/2879"316q_scs_sear * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"sreprotocolf">ppascs  t;/28 * *<020" c>20" a> bufa>, < *    7code=atu8class="sr3e" nam7="L3 75TIFYota3/28>fl3g * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srefea=u evpasc"drivers/atea=u e_ringef=; * *<020" c>20" a> bufa>, <atr733trbufa>, [3e"16893/a>d1vpasc"drivers/atscid_ring="Lfa href=fla       * *20"/a>  7t         7ufa>, [32]/* FoM_S-3 (no rs/////ne" n"2d=">/21"> 9spgef=""drivers/atfa_scid167aetich simu       9_d#L1s ired=iongef=""drivers/atf_d#L1s ired=ionme" r!ad=2eti>/28 *ataratr7ufa>, [32]/25atr3ufa>,3[4]20"/a>  7o         7ufa>, [32]1689I R/nvana2DEN>/28>fl3g * *<167aetich simu      tef">ppascs  t; *<.9" cmpfa hr"srefea=u evpasc"drivers/atea=u e_ringef=; * *<020" c>20" a> bufa>, <20" a> bufa>, </29thd3abufa39a}7"sref">atr7ufa>, [32]20" a> bufa>, < * 2    C24KIN3:20"/a>  7ot"> *    7   *7 si3n76ass="li3class="line" a2id=>/26a h3e ttas6ATAPI tapscl512 s don't gettth<:6right otherwise/*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  7o " n3me="7   *7 si3n76ref="+c3ed ATo36955d3020" c>20" a> bufa>, <16o20" c>20" a> bufa>, <atr7   *7 si3 77ode=scr3/aion/class="o2"+c>/28t">3*  sp3n>
7 eref">atr733trbufa>, [3e" *<,"/3>    32a>    /spads/not atar        7a an class="commes2 urn 17 st3e77ne" nrs/at9" cmpfa hrl89" ipgef="+code=ata_s7     /spas#L1ssmp_attach20cbreak;ref">atrs#L1ssmp_attach20=rca_scsi_sop_dev_as.pta/libata-scsi.cp> *"line" n"2d=">/21">likelef+= igned t csilikele=rca_scsi_sop_dev_asds/not   sr#L1_[3ek_maxs  a hrascs_sear *<.c#+[3ek_maxs  a hra=rca_="Lfa=2eti>/28 *ataratr7ufa>, [32]S/a3on/clo36955d="Lfa=2eti>/28 *20" a> bufa>, <, [32]16893/a>, [32]likelef+= igned t csilikele=rca_scsi_sop_dev_asds/not   sr#pta/libata-scsi.cp> * * *atar, [3e"ppascs  t;20" a> bufa>, <atr7ufa>, [32]16893/a>20" a> bufa>, <atr7ufa>, [32]/28t">3*  sp3n>
7keref">atr7ufa>, [32]20" a> bufa>, <20" a> bufa>, <20" a> bufa>, < *<,20" c>20" a> bufa>, <atr7vers/ata/libata-s/35id="L77203678_FW_REV3lass="sref">S/a3on/cllllllvannnnnnnnnnnnnnnconstl9" id="Li.c#L16m>at_s2t ds/atchingeablontrs9">ds/me" a href="+code=scaratar, [3e"atr7ufa>, [32]20" a> bufa>, </28);, 4<7"sref">atr7ufa>, [32] * 2    C24KIN3:20"/a>  7k;ref">atr7ufa>, [32]    /spas#L1ssmp_attach20cbreak;ref">atrs#L1ssmp_attach20=rca_scsi_sop_dev_as.pta/libata-scsi.cp> *atr7ufa>, [32]unlikelef+= igned t csiunlikele=rca_scsi_sop_dev_ass9">ds/atchingeablontrs9">ds/me" 167aetich simu      channelf">ppascs  t;ds/atchingeablontrs9">ds/me" 167aetich simu      lungef=""drivers/alun> *atar *7 si3<79ne" nam3="L1689">1689I R/nvano36955d9" cmpfa hr"sreNULLa href="+code=rNULL> *<020" c>20" a> bufa>, <atr733trbufa>, [3e"ds/atchingeablontrs9">ds/me" 167aetich simu      i0cbreak;ref">atriodref020" c>20" a> bufa>, <S"line" n"2d=">/21">unlikelef+= igned t csiunlikele=rca_scsi_sop_dev_ass9">ds/atchingeablontrs9">ds/me" 167aetich simu      i0cbreak;ref">atriodrefgee=;ds/atchingeablontrs9">ds/me" 167aetich simu      lungef=""drivers/alun> *atar *<020" c>20" a> bufa>, <atr7csi.c#L1620"4id="L3s2="co7men3d79TIFYota3/28>fl3gds/atchingeablontrs9">ds/me" 167aetich simu      channelf">ppascs  t;20" a> bufa>, <20" a> bufa>, <20" a> bufa>, < *<,"   32a>    /spads/not 20" a> bufa>, <atr8ufa>, [32]20" a> bufa>, <atr8u  *8men3"80name="L3"L1669">16696t2lin>/26KIN3:, [3e", [3e"@2hdca>31 erulaed t =="umberspan>

"n"2n c>/*1 erul@s9">ds/:4/1699  a hrcfrom a/lib we deef=" the ATA=l a hr="umberspan>
/1 numberspan>
20"/a>ds0"/3l9" id="t =,liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8ta/libata-8csi.c#L1620"4id="L3720" c8ass3"81an class="comment"> * 3    C31 erulmapc/hatton/atan6ATA bus, i.c#esingc/hattmappingliba clas"+cogth:"512 byt#s 41620" c>20"/a>  8t1ev_asize8vers/ata/libata-s/3.c#L16801 3d81       REin_lock_irqsa3e(hos31 eruldetermss= a/lib #L1s  a hrciatassoc lasd with theliba clas"+cogth:"512 byt#s 41620" c>20"/a>  8ta/libata-8  20"/a>20"/a>  8t3ref">atr8code=atu8class="sr3e" nam8="L3681a href="+code=scrbufcl3ss="s3liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8t4/libata-8code=atu8class="sr3e Fopa8ea03N81L1720" class="line" na3e="Lt31 erul
3D81CID_PR" class="sref">@2hdca>31 erulspin_>, <_irqhref(host >, 20"/a>  8t7        8ent"> *      sp@a/3..c#L1820"3181lass="s3ring">"n"2n c>/31 erulRETURNS
/31 erulAssoc lasd ATA=l a hr, or %NULLS"li_deifound=liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8t9        8 Co@rbuf: Rulpoe"23.9s="c8mme31810" c>20"/a>20"/a>  8nt"> *    8 Co@rbuf: Rulpoe"230" c>28"/a3<82=atrsme="L169" id="Li.c#L16m>at_s2#L1s  a hra href="+code=r#L1s  a hr="+codas"+cogth:"512 byt#s 41620" c>20"/a>  8n1ev_asize8 Co@rbuf: Rulpoe"230c#L16801 3"821"strLi.c#L16m>at_s2#L1st  *<,nconstl9" id="Li.c#L16m>at_s2t ds/atchingeablontrs9">ds/me" a href="+code=scaratar *    8 Co@rbuf: Rulpoe"232.c#L1820"3682" c>2rs/at9" cmpfa hrl89" ipgef="+code=ata_s8n>        8 Co@rbuf: Rulpoe"232" nam8="L3 82ne" nam3="L169" id="Li.c#L16m>at_s2#L1s  a hra href="+code=r#L1s  a hr="+code=rca_scsi_sop_ds/atchingeablontrol_me" rad=2eti>/28 *<,"   32a>    /spas9">ds/atchingeablontrs9">ds/me" a020" c>20" a> bufa>, <20" a> bufa>, <20" a>atu8a> 3<82CID_PR"3class"line" n"2d=">/21">unlikelef+= igned t csiunlikele=rca_!   32a>    /spads/atchingeablontrol_me" r|| !   32a>    /spa#L1s  a_enabl20cbreak;ref">atr#L1s  a_enabl20=rca_scsi_sop_dev_asds/atchingeablontrol_me" apa href="+code=scaratarSo36955d9" cmpfa hr"sreNULLa href="+code=rNULL> *<020" c>20" a> bufa>, </27"> 3* *    8code=atu8class="sr32ss="c8mme3l82TIFYota320" a> bufa>, <atr8csi.c#L1620"4id="L329s="c8mme3a82ref="o20" c>20" a> bufa>, <20" a> bufa>, < *    8code=atu8class="sr3i.c#L182033i83       REin_lock_irqsa3e(ho/3liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8"t"> *    8   *8 si3e83" c>20"/a>20"/a>  8">        8  20"/a>  8"4        8  20"/a>  8"5        8csi.c#L1620"4id="L39">atu8a> 3"83CID_PR" class="sref">@2hdca>31 erulRETURNS
20"/a>  8"lass="com8csi.c#L1620"4id="L39aaaaa8aa 3i83lass="s3ring">"n"2n c>/3/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8tt"> *    833trbufa>, [3e"u8f+= igned t csiuass="li3e" name="L165a2 cl>/25a h3ef="+35>
8"sref">atr833trbufa>, [3e"at_s2#L1st ataratr8ufa>, [32] *    8vers/ata/libata-s/3.c#L16801 3e841atrs/a3on/cl9witchn_scsi_sop_dev_assrs/1f+= igned t csisrs/1me" rode=eef=1e)ro7aeo7ae 1phrs/at9" cmpfa hrl89" ipgef="+code=ata_s8"t"> *    8ufa>, [32] * 2    C24KIN3:20"/a>  8">        8  1689o36955d9" cmpfa hr"sreATA_PROT_NODa ha href="+code=ra h_PROT_NODa h> *<020" c>20" a> bufa>, <20" a> bufa>, <20" a>atu8a> 3<84CID_PR"3classcase 6:SI R/nvanaent"> * 2    C24KIN3:20"/a>  8"         8   * 2    C24KIN3:20"/a>  8alass="com8vers/ata/libata-sc25e" na8e="31847FW_REV3lass=case 11:I R/nvanaent"> * 2    C24KIN3:20"/a>  8at"> *    8ufa>, [32] * *<020" c>20" a> bufa>, <atr8code=atu8class="sr2aaaaaa8aa 3d84ch simuted ATSI R/nmd=2eti>/28);, 4<8          8   * 2    C24KIN3:20"/a>  8          8   * 2    C24KIN3:20"/a>  8 sref">atr8   * *<020" c>20" a> bufa>, <16696t2lin>/26KIN3: *8 si3e85="strin3lass=case 0:SI R/nvanaent"> * 2    C24KIN3:20"/a>  8 ame="L162833trbufa>, [3e" * 2    C24KIN3:20"/a>  8          833trbufa>, [3e" * 2    C24KIN3:20"/a>  8 lass="com833trbufa>, [3e" * 2    C24KIN3:20"/a>  8 t"> *    8code=atu8class="sr3e" nam8="L3 85TIFYota3 * 2    C24KIN3:20"/a>  8 sref">atr833trbufa>, [3e" * 2    C24KIN3:20"/a>  8t * * 2    C24KIN3:20"/a>  8t         8ufa>, [32]/* FoM_S-3default:I R/nvanaent"> * 2    C24KIN3:20"/a>  8tsref">atr8ufa>, [32]20" a> bufa>, <20" a> bufa>, <20" a> bufa>, < * *<020" c>20" a> bufa>, <atr8ufa>, [32]20" a> bufa>, </27"> 3* *    8   *8 si3n86ass="li3class="line" a2id=>i31 numberspan>
20"/a> *8 si3 87an class="comment"> * 3    C31 erul@qc:9-scsi.c#9" id=ure#/atbe#initializ20=rumberspan>
atr8   *8 si3 87       REin_lock_irqsa3e(hos3=rumberspan>
atr833trbufa>, [3e"20"/a>20"/a>  8a>        8a an class="commes2 urn 18 st3e87a href="+code=scrbufcl3ss="s3liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8 @2hdca>31 erulZero on6suicess, non-zero on6failure=liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8asref">atr8ufa>, [32]20"/a>  8 lass="com8ufa>, [32]16me="L1620" c>20"/3>    32a>    /spaaed t 20"/a>  8 t"> *    8ufa>, [32]ppascs  t; *< =rode=e_scsi_sop_dev_asq_scs_sear * *<167aetich simu      tef">ppascs  t; *20" a> bufa>, <atr8ufa>, [32]16893/a>="Lpasc"+code=rct =="+code=rca_scsi_sop_s9spgef=""drivers/atfa_scidrad=2eti>/28 * *<167aetich simu      t  *<020" c>20" a> bufa>, <atr8ufa>, [32]/28 * *<167aetich simu      ds/atchingeablontrol_me" 020" c>20" a> bufa>, <atr8ufa>, [32]="Lpasc"+code=rcf">=="+c020" c>20" a> bufa>, <16696t2lin>/26KIN3:ppascs  t; *ppascs  t;/2820"/a>  8ke" n3me="8ufa>, [32]goto =2eti>/28atrinvalid_fl0="+c020" c>20" a> bufa>, <atr8vers/ata/libata-s/35id="L87203688ch si20" c>20" a> bufa>, < * 2    C24KIN3:20"/a>  8"sref">atr8ufa>, [32]/26a h3e * 12 i.c#16 brs/ CDBs us/ dif0er2id offset:6/a"line" name="L1639">16393/a>a3rb* prov>ds the various regisblr6values="line" name="L1639">16393/a>atr8ufa>, [32] * 3    C26a h3e */liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8k;ref">atr8ufa>, [32]atr8ufa>, [32] * 2    C24KIN3:20"/a>  8          8   *8 si3<89a href="+code=scrbufcl3ss="s26a h3e 26a h3e * 16-brs/ CDB - may contain extends0"-scsi.cs="line" name="L1639">16393/a>16393/a>@2hdca>tttttttt26a h3e * If4that6iss/he case,ncopys/he upper brs/ regisblr6values="line" name="L1639">16393/a>atr8vers/ata/libata-s/35id="L87203 89ch simuted ATSI R/nmdn3 oputtttttttt26a h3e */liba clas"+cogth:"512 byt#s 41620" c>20"/a>  8ke" n3me="8csi.c#L1620"4id="L3s2="co8men3d89lass="s3IRYoVPD pagea"linscsi_sop_dev_ascdba href="+code=rcdbscsi[1]rode=eef=01phrs/at9" cmpfa hrl89" ipgef="+code=ata_s8 sref">atr8csi.c#L1620"4id="L3s2="co8men3d89TIFYota3ppascs  t; */2820" a> bufa>, <ppascs  t; */2820" a> bufa>, <16893/a>ppascs  t; *ppascs  t;/2820" a> bufa>, </* FoM_S-3 (no rs/////lvanocsi_sop_dev_astef">ppascs  t; *atrhob_lbam nidrad=2eti>/2820" a> bufa>, <ppascs  t; *atrhob_lbah nidrad=2eti>/2820" a> bufa>, <1689I R/nvana2DEN>/28>fl3gppascs  t; *d1vpasc"drivers/atscid_ringef=;20" a> bufa>, <, [3e"20" a> bufa>, <, [3e"I R/nvana2DEN>/28>fl3gppascs  t; *d1vpasc"drivers/atscid_ringode=e= ~;20" a> bufa>, <20" a> bufa>, < * 2    C24KIN3:20"/a>  9_8        9asi.c#L1620"4id="L3s2="co9mme3t90ass="li3class="line" a2id=>/////////////////* Alwaysccopyslow brs/,9  a hrci.c#-scsi.c#regisblrs="line" name="L1639">16393/a>20"/a>20"/a>  9ta/libata-9csi.c#L1620"4id="L3720" c9ass3"919">16893/a>/28>fl3gppascs  t; */2820" a> bufa>, </* FoM_S-3 (no rs/a2DEN>/28>fl3gppascs  t; */2820" a> bufa>, <ppascs  t; *ppascs  t;/2820" a> bufa>, <1689SI R/nmdn2 oputtef">ppascs  t; *atrlbam nidrad=2eti>/2820" a> bufa>, <ppascs  t; *atrlbah nidrad=2eti>/2820" a> bufa>, <3D91CID_PR"3class="sref">SI R/nmdn2 oputtef">ppascs  t; */2820" a> bufa>, <S>i.c#L16m>at_s2tef">ppascs  t; */2820" a> bufa>, < *      sp@a/3..c#L1920"31917">16893/a> * 2    C24KIN3:20"/a>  9t9        9 Co@rbuf: Rulpoe"23.9s="c9mme31910" c>20"/a>16393/a> *    9 Co@rbuf: Rulpoe"230" c>29"/a3<92an class="comment"> * 3    C26a h3e mmmmmmmm*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  9n1ev_asize9 Co@rbuf: Rulpoe"230c#L16901 3"92t">/* FoM_S-3 (no rs/a2DEN>/28>fl3gppascs  t; *d1vpasc"drivers/atscid_ringode=e= ~;20" a> bufa>, < *    9 Co@rbuf: Rulpoe"232.c#L1920"3692" c>220" c>20" a> bufa>, <1689SI R/nmdn2 oputtef">ppascs  t; */2820" a> bufa>, <ppascs  t; */2820" a> bufa>, <20" a>atu9a> 3<92CID_PR"3class="sref">SI R/nmdn2 oputtef">ppascs  t; *ppascs  t;/2820" a> bufa>, <SSI R/nmdn2 oputtef">ppascs  t; *atrlbam nidrad=2eti>/2820" a> bufa>, </2879"316tef">ppascs  t; *atrlbah nidrad=2eti>/2820" a> bufa>, < *    9code=atu8class="sr32ss="c9mme3l92TIFYota3/28>fl3gppascs  t; */2820" a> bufa>, <atr9csi.c#L1620"4id="L329s="c9mme3a92ref="+c3ed ATSI R/nmd>i.c#L16m>at_s2tef">ppascs  t; */2820" a> bufa>, <16893/a>20" a> bufa>, < *    9code=atu8class="sr3i.c#L192033i93ode=scr3/aion/class="o2"+c>/28t">3*  sp3n>
9"t"> *    9   *9 si3e93"L1649"3PC-3 aent"> * 2    C24KIN3:20"/a>  9">        9  ppascs  t; */2820"/a>  9"4        9  ppascs  t; *ppascs  t; *20" a> bufa>, <atu9a> 3"93CID_PR"3a>/29thd3abufa39a}9"         9csi.c#L1620"4id="L39uffec9oto3d93_FW_REV3lass=9witchinscsi_sop_dev_astef">ppascs  t; * * 2    C24KIN3:20"/a>  9tt"> *    933trbufa>, [3e"20"/a>  9tsref">atr933trbufa>, [3e"20"/a>  9"sref">atr9ufa>, [32]20"/a>  9"t"> *    9vers/ata/libata-s/3.c#L16901 3e94 lis /of inqucase ;20"/a>  9"t"> *    9ufa>, [32]ppascs  t; *ppascs  t;/28 * *ppascs  t; *20"/a>  9">        9  168999999999goto =2eti>/28atrinvalid_fl0="+c020" c>20" a> bufa>, < * *<167aetich simu      tect_sizsscs_sear */28 9spgef=""drivers/atfa_scida020" c>20" a> bufa>, <20" a>atu9a> 3<94CID_PR"3class="sref">break020" c>20" a> bufa>, <20" a> bufa>, < * 2    C24KIN3:, < sizsc(e.g. 512 or 4K)c*/liba clas"+cogth:"512 byt#s 41620" c>20"/a>  9at"> *    9ufa>, [32]20"/a>  9"sref">atr9code=atu8class="sr2aaaaaa9aa 3d949ID_PR"3classcase ;20"/a>  9          9  20"/a>  9 t"> *    9   * 2    C24KIN3:20"/a>  9 sref">atr9  20"/a>  9 >        9   *9 si3e953ID_PR"3classcase ;20"/a>  9          9   *9 si3e95="strin3lass=case ;20"/a>  9 ame="L162933trbufa>, [3e" * 2    C24KIN3:20"/a>  9          933trbufa>, [3e"20"/a>  9 lass="com933trbufa>, [3e"20"/a>  9 t"> *    9code=atu8class="sr3e" nam9="L3 95TIFYota320"/a>  9 sref">atr933trbufa>, [3e"20"/a>  9t *20"/a>  9tt"> *    9ufa>, [32]20"/a>  9tsref">atr9ufa>, [32]20"/a>  9t>        9ufa>, [32]20"/a>  9t         9code=atu8class="sr3e Fopa9ea03"96="strin3lass=case ;20"/a>  9tame="L1629ufa>, [32]20"/a>  9t         9ufa>, [32]20"/a>  9tlass="com9   *9 si3n967FW_REV3lass=case ;20"/a>  9tt"> *    9   *9 si3n96TIFYota320"/a>  9tsref">atr9   *9 si3n969ID_PR"3classcase ;20"/a>  9          9   *9 si3 970FW_REV3lass=case ;20"/a>  9 t"> *    9   *9 si3 97 lis /of inqucase ;20"/a>  9 sref">atr933trbufa>, [3e"20"/a>  9a>        9a an class="commes2 urn 19 st3e973ID_PR"3classcase ;20"/a>  9a         9code=atu8class="sr2aaaaaa9aa 3a97="strin3lass=case ;20"/a>  9aame="L162933trbufa>, [3e"20"/a>  9asref">atr9ufa>, [32]20"/a>  9alass="com9ufa>, [32]20"/a>  9at"> *    9ufa>, [32]/28 *20" a> bufa>, <20" a> bufa>, <atr9ufa>, [32]20" a> bufa>, <atr9ufa>, [32] * 2    C24KIN3:20"/a>  9keref">atr9ufa>, [32]20"/a>  9k>        933trbufa>, [3e"1689SI R/nmdn2 oputq_scs_sear * *<167aetich simu      tect_sizsscs_sear */2820" a> bufa>, <20" a> bufa>, </29thd3abufa39a}9ksref">atr9vers/ata/libata-s/35id="L972036986lis /of inquoent"> * 2    C24KIN3:20"/a>  9klass="com933trbufa>, [3e""n"2n c>/////////* Set tscid so4that6all#regisblrs will#be written, san  onliba clas"+cogth:"512 byt#s 41620" c>20"/a>  9kt"> *    9ufa>, [32]/26a h3e * write#indicasion6(used for PIO/DMA6setup),#result TF isliba clas"+cogth:"512 byt#s 41620" c>20"/a>  9k " n3me="9ufa>, [32]/26">a3rb* copied backci.c#we don't a/lne#/ao muib #bout its6failure=liba clas"+cogth:"512 byt#s 41620" c>20"/a>  9"sref">atr9ufa>, [32] * 3    C26a h3e */liba clas"+cogth:"512 byt#s 41620" c>20"/a>  9k;ref">atr9ufa>, [32]ppascs  t; *d1vpasc"drivers/atscid_ringef=;20" a> bufa>, <atr9ufa>, [32]20" a> bufa>, <1689SI R/nmdn2 oputtef">ppascs  t; *d1vpasc"drivers/atscid_ringef=;20" a> bufa>, <, [3e"20" a> bufa>, < * *<167aetich simu      f">d1vpasc"drivers/atscid_ringef=;20" a> bufa>, <atr9vers/ata/libata-s/35id="L97203 99ch si20" c>20" a> bufa>, < * 2    C24KIN3:20"/a>  9 sref">atr9csi.c#L1620"4id="L3s2="co9men3d99ass="li3class="line" a2id=>/26a h3e * Set transfer length=liba clas"+cogth:"512 byt#s 41620" c>20"/a>  9" " n3me="929thd /span>"drivers/a4am9;a3rb*liba clas"+cogth:"512 byt#s 41620" c>20"/a> 30_dev_asiz30_devd /span>"drivers/a4a30_de>30_dss="li3class="line" a2id=>/26a h3e * TODO: find out if#we need to do more here#/aliba clas/pre>s"+cogth:"512 byt#s 41620" c>20"/a> 30_1ev_asiz30_fa>, [32]20"/a> 30_2ev_asiz30_fa>, [32]20"/a>20"/a> 30_3ev_asiz30_  30_ <>30_ne" nam3="L16a2DEN>/28>fl3g<0" _qc_set_pc_nbrs/1vpasc"drivers/a0" _qc_set_pc_nbrs/1="+cne" n"2d=">/21">q_scs_sear * *20" a> bufa>, <20" a> bufa>, < * 2    C24KIN3:20"/a> 30_6ev_asiz30_ers/ata/libata-s/35id="30_er>30_6L1649"3PC-3 "linscsi_sop_dev_astef">ppascs  t; *ppascs  t;/28 * *20" a> bufa>, <30_lass="s3IRYoVPD pageagoto =2eti>/28atrinvalid_fl0="+c020" c>20" a> bufa>, <30_ass="li3e" name="L165a2 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span>"drivers/a4a30_9t>30_9ID_PR"3classoent"> * 2    C24KIN3:20"/a> 301dev_asiz30csi.c#L1620"4id="L3720" 30csi>30csL1649"3PC-3 "linnscsi_sop_dev_ascdba href="+code=rcdbscsi[1]rode=eef=e0)rode=eode=ee!=2eti>/28tef">ppascs  t; *20" a> bufa>, </* FoM_S-3 (no rs/goto =2eti>/28atrinvalid_fl0="+c020" c>20" a> bufa>, <220" c>20" a> bufa>, <30c3L1649"3PC-3 "linscsi_sop_dev_asis_multistaskfilsgef=""drivers/ais_multistaskfils="+cne" n"2d=">/21">tef">ppascs  t; *30c="strin3lass="line" n20" c>20"/3>    32a>    /spamultiscountatchingeablontrmultiscount="+crad1 <<inscsi_sop_dev_ascdba href="+code=rcdbscsi[1]ro7aeo7ae 50_5ev_asiz30_3trbufa>, [3e" * 2    C24KIN3:20"/a> 301dev_asiz30csi.c#L1620"4id="L3s2="L1920"31917">16893/a>/////////* Set tscid so4that6allcasblr/gatwither brs/si.d ;<inscsilinesiz30c_s#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"4id="L3s2=""c9mme3 91TIFYota3/////////////////* Alwaysccopyslow brs/,9byt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"4drivers/a4"c9mme31910" c>20"/a>20" a> bufaultistaskfilsgef=""ntrmultiscount="+crad1 <<inscsi_sop_ROT_assscs_sear29"/a3<92an class="comm0">29>0">2ak020" c>20" a> bufat6issue Dt_pc_nbrs/1vpasc"d   _war_dired=ion="+crasc"d   _war_">ppascs  t; *th:"510" a> b ;<inscsil%u pame>/* FoM_S-3 #L169>0">//lvanocsi_sop_dev_astef">ppa bufat6issue Dt_pc_nbrs/1vpantrmultiscount="+crad1 <<inscsi_sopa3e"220" c>20"c#L19>0">op_dev_ast spa href="drivers/9ke" n3me="9ufa>, [32]0">s="sr3e" nam9="L3 92ne" nam3="L168 nam9>0">lin>/26KIN3:s="sr3e Fopa9ea03d92="strin3lass="Fopa9>0">4   C24KIN3:20"/a> 301dev_asiz30csi.c#L1620"2bata-9codetu9a> 3<92CID_PR"3class=detu9>0">hdca>tttttttt26a h3e * If4that6iss/h* Fil"L16SET_FEATURES - XFER MODEe" name="-- ogth:wise,yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"230_3t>30_Cec9oto3l92_FW_REV3lass="_Cec9>0"> oputtttttttt26a h3e */liba clas"+co*6SET_FEATURES - XFER MODEemusta clpreceded/ilureededyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"2id="L3s2="aa9aa 3n92lass="s3IRYoVP="aa9>0">n c>/////////* Set tscid so4that6all#rby ///updatbersphardware-specificten, san  o*/lie/siyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"2id="L3s2=""c9mme3l92TIFYota30">id=>/26a h3e * Set transfer length=libcs="rollL16(i.e.er brreasogth/li_m21"2d=">io a> (),yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"2drivers/a4"c9mme3a92ref="+c3ed ATSa4"c9>0">si.>/26">a3rb* copied backci.c#we don&_m21"2d=">20 a> (),#/ao _m21"post"2d=" a> () hooks)byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]16893/a>0""Lomms26a h3e */liba clas"+cogth:"512 byt#s 41620" c>20"/a> 30_3ev_asiz30_ 0""op_dev_ascdba href="+code=rcdbscrs/at9" cmpfa hr"sre-scsi.ca href="+code=rcscsi.c="+crad=2eti>/28 *20"/a> 30_3ev_asiz30_ 0""inscsi_sop_dev_asscs  t; *d1vpasc"drivers/atscia=u e_ringad=2eti>/28/28SETFEATURES_XFER_sopa href="drivers3011ev_asiz30vers/ata/lib3s="sr3e" nam9="L3a93ne" nam3="L16a nam9>0"" R/nmdn2 oputtef">ppaalid_fl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, <0"", <0""    C24KIN3:20"/a> 30_3ev_asiz30_ 30_Cec9oto3d93_FW_REV3lass=9_Cec9>0"" oputtttttttt26a h3e */liba clas"+co*6Fil"L16TPMcogth:"512by byt#s 4. Thesegisblr6vaabyt#s 41620" c>20"/a>  9kt"> *    9ufa>, [32]0""id="L3s2="aa9aa 3i93lass="s3IRYoVo="aa9>0""n c>/////////* Set tscid so4that6all#re51bn hrely  /cs="rollLd encryp(e.gth:"51/lne#doorth:"512betweebyt#s 41620" c>20"/a>  9kt"> *    9ufa>, [32]0""id="L3s2=""+9ode=a93TIFYota30""id=>/26a h3e * Set transfer length=libapplMA6setus#/ao r brdisk.ba cl    9u.relow_tpm=1a hryouyt#s 41620" c>20"/a>  9kt"> *    9ufa>, [32]0""drivers/a4"+9ode=a939ID_PR"3classca4"+9>0""si.>/26">a3rb* copied backci.c#we don&hgth:arrealrreasogth/liwan hngersp_sizr bm. This ensancbyt#s 41620" c>20"/a>  9k " n3me="9ufa>, [32]304id="L3720""c9mme3D940FW_REV3lass=c0""c9>0""ci.>/26">a3rb* copied backci.c#we don&/he upnstallLd softwarers/nif#neasily me51 stuff/uptwithoui_s#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"4ta-s/3.c#L16901 3e94 lis /of inquc#L169>0""e(hos26a h3e *       co2 b scasblr/gat_sirtisco2 . DVR typector  onlibaisbbably shiptwither is encs="dyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"4aaaaa3i.c#r19spa3194"L1649"3PC-3 rc#r19>0""comms26a h3e */liba clas"+cogth:"512 th/limblrebcs="me="h:"agelas"byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]20"/a> 30_3ev_asiz30_ 0""e="Lttttttttt26a h3e *"line" name="L* Notberhe uh/liTIF8e#/as/nno DMA6a DCS chang="lineDCS freeze 4K)cyt#s 41620" c>20"/a> 30_3ev_asiz30_  3<94CID_PR"3class=detu9>0""hdca>tttttttt26a h3e * If4that6iss/h* h/lir is tialihouldas/pigthurumbebut&/he up uppeif#nsufficime="abyt#s 41620" c>20"/a>  9k " n3me="9ufa>, [32]30430_3t>30_Cpa9ea03 94ch si20" c>20"_Cpa9>0"" oputtttttttt26a h3e */liba clas"+co*6DCS is ti opsetualr20"/a>  9k " n3me="9ufa>, [32]304id="L3s2="na9e="3194lass="s3IRYoVo="na9>0""n c>/////////* Set tscid so4that6all#rill#be w#/asomply wither brTC8f+= ortium 32a>Ld goalr#be w6valusL1yt#s 41620" c>20"/a>  9k " n3me="9ufa>, [32]304id="L3s2="r19spa3194TIFYota30""id=>/26a h3e * Set transfer length=libc h33ann"L16rTC820"/a> 30_2ev_asiz30_fa>, [32]0""si.>/26">a3rb* copied backci.c#we donbyt#s 41620" c>20"/a> 30_3ev_asiz30_ 0"pap_dev_ascdba href="+code=rcdbscrs/at9" cmpfa hr"sre-scsi.ca href="+code=rcscsi.c="+crad=2eti>/28/28/28siz30__relow_tpm_sopa href="drivers3011ev_asiz30vers/ata/lib5ta-s/3.c#Lpa9ea03o95 lis /of inquo#Lpa9>0"pto =2eti>/28atrinvalid_fl0="+c020" c>20" a> bufa>, <0"p, <0"p R/nmdn2 oputre3ann"0a href="drivers3012ev_asiz30  0"p    C2fl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, <<1620" c>20"/a>  9k>        933trbufa>,0"p30_3t>30_C"+9ode=i95_FW_REV3lass=c_C"+9>0"p    C24KIN3:/28sc"dd=">/2d="1bns_">ppascs  t; *0"p    C24KIN3: b fielltis cdbth:"512 byt#s 41620" c>20"/a>  9keref">atr9ufa>, [32]0"pid="L3s2="am9="L3 95TIFYota30"p8R/nmdn2 oputre3ann"13e"0"psi.>/a href="drivers/9ke" n3me="9ufa>, [32]0"6id="L3720"aa9aa 3"960FW_REV3lass=c0"aa9>0"aa <ic  /spamultiscountatchingeablosc"dd=">/for P_s in_xlaount="+crad1 <sc"dd=">/for P_s in_xlao">ppastruccountatchingeablosc"dqueued_cid167aetich simu sc"dqueued_cidR/nmd*ar * *20" a> bufa>, << href="drivers30_5ev_asiz30_3trbufa>, [6aaaaa3i.c#r19spa3l96"L1649"3PC-3 cc#r19>0"a, <0"a R/nmdn2 oputstruccountatchingeablosc"dis_multistaskfils="+cnesc"dis_multiR/nmd*ar * * * *<167aetich simu      f">d1vpasc"drivers/atscrs/at9" cmpfa hr"sre-sc3e"/28d=">/cmc=R/nmd*ar * * *<=">cid167aetich simu   ">cide-sc3e"0"a5R/nmdn2 oputstruccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * * *id167aetich simu       ma3e"0"aROD"sre+cma h_+= countatchingeablou clLBA48="+c020"u8R/nmd*ar * */28cmc=R/nm3e"0"a    C24KIN3:0"a8   C24KIN3:0"a9   C24KIN3:0" *   C24KIN3: * */28t">3*  sp3n>
9"t"> *    9  0"     C24KIN3:20"/a> 30_6ev_asiz30_ers/ata/lib7s="sr3e" n 19 st3e973ID_PR"3classc n 19>0" op_dev_asis_multistaskfilsgef=""unlikely9 si3e93"+c020"unlikely">ppaistaskfilsgef=""id167aetich simu       ma_m21"a href="+code=r ma_m21" nidraad0a20" c>20" a> bufa20"/3>    32a>   alid_fl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, <0" >, <30_Cr19spa3C97_FW_REV3lass=c_Cr19>0" op_dev_astef">ppascs  t; *ppa""drivers/atfa_scid167aetich simu        a hra href="+code=r  cmd_bufflen="+cne" n"2cmd_bufdba hilca 160" to =2eti>/28atrinvalid_fl0="+c020" c>20" a> bufa>, <ppa""drivers/atfa_si[1]ro7aeo7ae 50_5ev_asi,/s3aniar * * * *0" 9, <20"0"r19>0"r1   C24KIN3:20"/a> 30_6ev_asiz30_ers/ata/lib8ta-s/3.c#Lr19spa3"98 lis /of inquo#Lr19>0"rop_dev_ascdba href="+code=rcdbscunlikely9 si3e93"+c020"unlikely">ppaief="+code=rcdbscsi[1]rode=eef=e0)rode=eode=ee!=2eti>/8)0"rinscsi_sop_dev_astef"alid_fl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, <0"rlin>/26KIN3:0"r4   C24KIN3:20"/a> 301dev_asiz30csi.c#L1620"8bata-9coder19spa3"98CID_PR"3a>0"rhdca>tttttttt26a h3e * If4that6iss/h* i.cardSAME aa hrcihas a as"+co*/libd 21">er as payload,ir isyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620"830_3t>30_C"L972036986lis /of inquo_C"L9>0"r oputtttttttt26a h3e */liba clas"+co*6ihouldane=libbA6a ;<ple /liry S/G lis"byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]=""+9>0"rn c>/////////* Set tscid so4that6all#byt#s 41620" c>20"/a> 30_6ev_asiz30_ers/ata/lib8id="L3s2="r19spa3D98ass="li3class=="r19>0"r8p_dev_ascdba hreistaskfilsgef=""d=">/2gltiscount="+crad1 <d=">/2gltisco">ppa""drivers/atfa_scid167aetich simu        a0"reak020" c>20" a> bufaalid_fl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, <0"r1in>/26KIN3:0"rre+cmtef">ppascs  t; *ppa""drivers/atfa_sg_page167aetich simu  g_page">ppa""drivers/atfa_sc">/2glis"unt="+crad1 <d=">/2glis"">ppa""drivers/atfa_scid167aetich simu        a0"r2   C24KIN3:/2fa>, <ppa""drivers/atfa_bus/at9" cmpfa hr"bus, <<,&quo, * */26KIN3:20"Fo"+9>0"r4   C24KIN3:ppascs  t;/28 * *0"rre+cmq_scs_sear * *ppascs  t;/28hob_ia=u e_ATA_PRT0a href="drivers3012ev_asiz30  30_C"L97203 99ch si20" c>20"_C"L9>0"r    C24KIN3:/28ppascs  t;0"r8   C24KIN3:/28/2fa>, <0"r9   C24KIN3:/2830_dss="li3class="1ine" 100   C24KIN3:20" a> bufa>, <
  • clDEVICEccccccgoto*20" a> bufa>, <,s102rivers/a1a19spa3199"L1649"3PC-3 "c1class10, <q_scs_sear * *20" a> bufa>, <30_ame="20" c>20" 1> buf1>, <30_CID_PR"3classoe1t"> *12 C24KIN3:30_6L1649"3PC-3 "l1nscsi10, <atrinvalid_fl0="+c020" c>20" a> bufa>, <<1620" c>20"/a> 9k> 933trbufa>,014id="L3s2=1c30_si>30_ass="li3e" name1"L165108 C24KIN3:/2d="1bns_ringad=2eti>/28sc"dd=">/2d="1bns_">ppascs t; *30_9ID_PR"3classoe1t"> *12 C24KIN3: b fielltis cdbth:"512 byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]014id="L37201 30csi>30csL1649"3PC-3 "l1nnscs1_sop_dev_ascdbre3ann"13e"/* FoM_S-3 (1o rs/1oto =2a href="drivers/9ke" n3me="9ufa>, [32]01aaaaaa3i.c1L30 <>30c" c>220" c>20" 1> buf1>, <30c3L1649"3PC-3 "l1nscsi11ss="s26a h3e 26a h3e * 16-b/*myt#s 41620" c>20"/a> 301dev_asiz30csi.c#L16201ss="sr3e F1p30cod>30c="strin3lass="l1ne" n11e="Lttttttttt26a h3e *"line"ather csc"dmsel8#s 41620" c>20"/a> 301dev_asiz30csi.c#L16201se" bu11hdca>tttttttt26a h3e * If4thather c@qc: Storage h/lirs"+cla>Ld c> is_multiR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L16201sta-s/35id1ID_PR"3classoent"> * 2 1C24KI11 oputtttttttt26a h3e */liba ather c@buf:einput 21">erR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L16201s7a-s/35id1L1920"31917">16893/a>/////////* Set tscid so4ather c@len: numberline a> b ">q_stis r brinput 21">erR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L16201sid="L3s2=1"c9mme3 91TIFYota3/////////////////* Alwaymyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L16201sdrivers/a1"c9mme31910" c>20"/a>/26">a3rb* copied backciather cPre"arvaa is_multierspmodifyis/sihngeinform6setuph/lir e a hr="byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<12id="L37201>29"/a3<92an class="comm01>29>012ci.>/26">a3rb* copied backcimyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162012ta-s/3.c#116901 3"92t">/* FoM_S-3 #1169>012e(hos26a h3e * co2 b sather cLOCKING:yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162012aaaaa3i.c1L1920"3692" c>220" c>20"c1L19>012comms26a h3e */liba clas"+coather cNon"byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<12s="sr3e" 1am9="L3 92ne" nam3="L168 1am9>012ss="s26a h3e 26a h3e * 16-br byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]01>s="sr3e F1pa9ea03d92="strin3lass="F1pa9>01>4 C32a>ic iscountatchingeablosc"dmsel8/28sc"dmsel8ppastruccountatchingeablosc"dqueued_cid167aetich simu sc"dqueued_cidR/nmd*ar * *20" a> bufa>, <, href="drivers3011ev_asiz30vers/ata/li12bata-9cod1tu9a> 3<92CID_PR"3class=d1tu9>012eak020" c>20" a> bufaaaaaaaaaaaaaaaa_+= countatchingeablou clLBA48="+c020"u8R/nmd*ar * *ppa href="drivers3011ev_asiz30vers/ata/li1230_3t>30_1ec9oto3l92_FW_REV3lass="_1ec9>01> oputgef="+code=ata_30c4ev_asiz30code=atu8cl12id="L3s2=1aa9aa 3n92lass="s3IRYoVP=1aa9>012 C24KIN3: * * * *<167aetich simu f">d1vpasc"drivers/atscrs/at9" cmpfa hr"sre-sc3e"0128 C24KIN3:012ROD"sre+cma h_har Dt_pc_nbrs/1vpanpage167aetich simu mpage">pp[Dt_pc_nbrs/1vpaCACHE_MPAGE_LEN167aetich simu CACHE_MPAGE_LEN">pp]3e"16893/a>0130 C24KIN3:/28t">3* sp3n> 9"t"> * 9 013 C24KIN3:20"/a> 9keref">atr9ufa>, [32]013s="sr3e" 1am9="L3a93ne" nam3="L16a 1am9>013ss="s26a h3e 26a h3e * 16-brs/ CDB -- The fir cotwo ">q_stinedefss/sie_mpage arvaa header,rilloffsetsyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162013s="sr3e F1pa9ea03_93="strin3lass="F1pa9>013e="Lttttttttt26a h3e *"line" name="L* is mpage arvaL16rby 2gth:"arva clabus. Slasph/libufbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<13bata-9cod1tu9a> 3"93CID_PR"3a>013hdca>tttttttt26a h3e * If4that6iss/h*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]01330_3t>30_1ec9oto3d93_FW_REV3lass=9_1ec9>013, <013 C24KIN3:< href="+code=rcdbscbufflen="+cne" n"2buf">pp_ROT_assscs_searppe- 2a href="drivers3011ev_asiz30vers/ata/li1"id="L3s2=1"+9ode=a93TIFYota3013DEN>/28>fl3g0139, <0140 C24KIN3:/28t">3* sp3n> 9"t"> * 9 014 C24KIN3:20"/a> 9keref">atr9ufa>, [32]014s="sr3e" 1pa9ea03 94ne" nam3="L168 1pa9>01"ss="s26a h3e 26a h3e * 16-brs/ CDB -- Ci.cs6#be wread-only bcogtarvaif#nmodifiedbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<14s="sr3e F1:h9r m3e94="strin3lass="F1:h9>01"e="Lttttttttt26a h3e *"line" name="L*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]014bata-9cod1tu9a> 3<94CID_PR"3class=d1tu9>014re+cmq_scs_sear * */28sc"dmsensess/sihng">ppascs t; *20 sc_,pp,/28fals_>, <20"_1pa9>014 C24KIN3:pp[2ee!=2et= ~(v_ascdba hr2a3e"014 C24KIN3:pp[2eeli clISADDRccccccgw="+c167aetich simwc>, <0148p_dev_ascdba hre/ntatchingeablonemcmp167aetich simu memcmp">ppascs t; *pp + o,ppe- 2a_ROT014eak020" c>20" a> bufare3ann"-_assscs_sear0151in>/26KIN3:ppascs t; *d1vpasc"drivers/atscid_ringef=;20" a> bufa>, <
  • 0152 C24KIN3:ppascs t;/28 * *clISADDR="+cre=; * hrTa href="drivers/9 " n3me="933trbufa>,315s="sr3e" 1 *9 si3e953ID_PR"3classc 1 *9>015fl3g<0" _qc_set_pc_nbrs/1vpars/at9" cmpfa hr"srensectatchingeablontrnsect nidrad=2eti>/28ppascs t;/28015re+cmq_scs_sear * *ppascs t;/28, <30_1"+9ode=i95_FW_REV3lass=c_1"+9>01p C24KIN3:01p Ca href="drivers/9ke" n3me="9ufa>, [32]01pid="L3s2=1am9="L3 95TIFYota3015 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span15drivers/a1"+9ode=<959ID_PR"3classca1"+9>015si.>/26">a3rb* copied backc/*myt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162016id="L37201aa9aa 3"960FW_REV3lass=c01aa9>016ci.>/26">a3rb* copied backcimKIN3:op" a> _sel820"/a> 301dev_asiz30csi.c#L162016ta-s/3.c#1r19spa3l96 lis /of inquc#1r19>016e(hos26a h3e * co2 b sather c@qc: Storage h/lirs"+cla>Ld c> is_multiR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162016aaaaa3i.c1r19spa3l96"L1649"3PC-3 cc1r19>016comms26a h3e */liba clas"+coaR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162016s="sr3e" 1r19spa3l963ID_PR"3classc 1r19>016ss="s26a h3e 26a h3e * 16-br ther cCon 30ogtaeMODEeSELECT/" name="to ti c> SET FEATURES is_multibyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<16s="sr3e F1pa9ea03"96="strin3lass=cF1pa9>016e="Lttttttttt26a h3e *"line"ather cAssumeir is is invokresult OD"sre acce51 a hr="s (e.g.rdisks)ionlybyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<16bata-9cod1r19spa3l96CID_PR"3classcd1r19>016hdca>tttttttt26a h3e * If4thather cTreassihouldabvaif b4K)c a scrip+co*ult ogth: a hr=" typesbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<1630_3t>30_1na9e="3i96_FW_REV3lass=c_1na9>016 oputtttttttt26a h3e */liba ayt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<16id="L3s2=1 *9 si3n967FW_REV3lass=c=1 *9>016n c>/////////* Set tscid so4ather cLOCKING:yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162016id="L3s2=1 *9 si3n96TIFYota3016id=>/////////////////* Alwaymther cspin_4K)c_irqsave(host 4K)c)yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162016drivers/a1 *9 si3n969ID_PR"3classca1 *9>016si.>/26">a3rb* copied backciabyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]017id="L37201 *9 si3 970FW_REV3lass=c01 *9>01 * C32a>ic /spamultiscountatchingeablosc"dd=">/ a> _sel8/ a> _sel8ppastruccountatchingeablosc"dqueued_cid167aetich simu sc"dqueued_cidR/nmd*ar * *20" a> bufa>, /gef="+code=ata_30c4ev_asiz30code=atu8cl1 aaaaa3i.c1"+9ode=i97"L1649"3PC-3 cc1"+9>01 C24KIN3:/cmc="+crad=2eti>/28d=">/cmc=R/nmd*ar * * *<=">cid167aetich simu ">cide-sc3e"01 op_dev_asis_m_+= countatchingeablou clLBA48="+c020"u8R/nmd*ar * */28cmc=R/nm3e"20"/3> _+= countatchingeablou clLBA48="+c020"u8R/nmd*ar * *017re+cmq_scs_sear * */28pg, <<,&_assscs_sear/28spg, <<3e"q_ringad=2eti>/28six_">q_, <<,&_assscs_sear01 to =2eti>/28pp3e"017 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span17drivers/a1"+9ode=A97ref="+c3ed ATSa1"+9>0179 C24KIN3:ppasC71PC-3 rs/astring">th:"51ENTER\nth:"51yt#s 41a3e"20"01r19>0181in>/26KIN3:018re+cmtef">ppascs t; *q_ringad=2eti>/28six_">q_, <, <01rinscsi_sop_de hre/ntatchingeablosix_">q_ringad=2eti>/28six_">q_, <018 R/nmdn2 oputtef">ppa hre/ntatchingeabloscid167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba hilca 5a href="drivers30_7ev_asiz30_si.c#L162018s="sr3e F1r19spa3i98="strin3lass=oF1r19>01r4 C24KIN3:<<<<<<<<<<<<<<<<atrinvalid_fl0="+c020" c>20" a> bufa>, <018>, <30_1"L972036986lis /of inquo_1"L9>018:pp_OT_DMAscs_sear=1"+9>018to =2eti>/2801r8p_dev_ascdba} elsepgef="+code=ata_30c4ev_asiz30code=atu8cl18drivers/a1r19spa3D98ref="+c3abl//(a1r19>01reak020" c>20" a> bufa hre/ntatchingeabloscid167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba hilca 9a href="drivers30_7ev_asiz30_si.c#L162019id="L37201r19spa3199an class="comm01r19>0192ak020" c>20" a> bufat6issue alid_fl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, </28t">3* sp3n> 9"t"> * 9 019inscsi_sop_dev_astef"D="+code=rcdbscbufflen="+cne" n"2buf">pp_OTa""drivers/atfa_si[1]rode=eef=e0)rode=eode7]_ascdba hr8) +T_DMAscs_searppa_assscs_sear20"F1"+9>01r4 C24KIN3:019>, <30_1"L97203 99ch si20" c>20"_1"L9>01r C24KIN3:20"/a> 9keref">atr9ufa>, [32]019id="L3s2=1co9men3d99lass="s3IRYoVo=1co9>019 C24KIN3:< hreef="+code=rcdbscsi[1]rode=eef=e0)rode=eode=ee!=2eti>/11a_ROT019DEN>/28>fl3gatrinvalid_fl0="+c020" c>20" a> bufa>, <0199, <30_dss="li3class="2ine" 201 C24KIN3:20"/a> 9keref">atr9ufa>, [32]02"1rivers/a2a19spa3 99 lis /of inqu;#2_irqs20op_dev_ascdba hreistaskfilsgef=""d=">/2gltiscount="+crad1 <d=">/2gltisco">ppa""drivers/atfa_scid167aetich simu a< |i clDEVICEccccccgsc">/2glis"unt="+crad1 <d=">/2glis"">ppa""drivers/atfa_scid167aetich simu a< hra href="+code=r bufgthflen="+cne" n"2bufgthdba hilca D="+code=rcdbscbufflen="+cne" n"2buf">ppa href="drivers30_7ev_asiz30_si.c#L1620202rivers/a2a19spa3199"L1649"3PC-3 "c2class20inscsi_sop_dev_astef"alid_fl0cbreak;ref">atrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, <30_ame="20" c>20" 2> buf204 C24KIN3:ppa""drivers/atfa_sg_page167aetich simu g_page">ppa""drivers/atfa_sc">/2glis"unt="+crad1 <d=">/2glis"">ppa""drivers/atfa_scid167aetich simu a30_CID_PR"3classoe2t"> *20>, <30_6L1649"3PC-3 "l2nscsi20 C24KIN3:20"/a> 9keref">atr9ufa>, [32]02"7a-s/35id2"o9men3d99lass="s3IRYoVo=2pagea20 C24KIN3:< href="+code=rcdbscbufflen="+cne" n"2buf">pp_ilca D="+code=rcdbschdr_bufflen="+cne" n"2hdr_buf, </28>fl3gatrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, < *209, <q_ringad=2eti>/28six_">q_, <30ct">/* FoM_S-3 (2o rs/21//lvanocsi_sop_dev_as_assscs_sear220" c>20" 2> buf21inscsi_sop_deelsee"ppa_assscs_sear30c="strin3lass="l2ne" n21, < bu21re+cmq_scs_sear * *pp_-f=""drivers/atfa_hdr_bufflen="+cne" n"2hdr_buf, <<3e" * 2 2C24KI21 C24KIN3:16893/a>pp_ilca D="+code=rcdbscbd_bufflen="+cne" n"2bd_bufdba ia href="drivers/9t4/libae1 [3e"/28>fl3gatrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, <20"/a>20" a> bufaalid_fl0cbreak;ref">atrinvalparamflen="+cne" n"2atrinvalparam, </* FoM_S-3 #2169>022"+c>/28t">3* sp3n> 9"t"> * 9 220" c>20"c2L19>0222 C24KIN3:pp_-f=""drivers/atfa_bd_bufflen="+cne" n"2bd_bufdba 3e"0224 C24KIN3:< href="+code=rcdbscbufflen="+cne" n"2buf">pp_=OT022eak020" c>20" a> bufaalid_fl0cbreak;ref">skip167aetich simu skipdba 3e"022, <20"/a> 9keref">atr9ufa>, [32]022id="L3s2=2"c9mme3l92TIFYota30228 C24KIN3:/28pg, </3f3e"0229 C24KIN3:< href="+code=rcdbscp167aetich simu pR/nm[0ee!=2eti>/40ipgef="+code=ata_30c4ev_asiz30code=atu8cl23id="L37202"L97203 939">16893/a>0232ak020" c>20" a> bufa href="+code=rcdbscbufflen="+cne" n"2buf">pp_ilca 4a href="drivers30_7ev_asiz30_si.c#L162023ta-s/3.c#2L192033i93ode=scr3/aion/#2L19>023//lvanocsi_sop_dev_astef">_sealid_fl0cbreak;ref">atrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, <023, <ppa_assscs_sear/28spg, <0234 C24KIN3:<<<<<<<<<_assscs_sear023eak020" c>20" a> bufaet_pc_nbrs/1vpap167aetich simu pR/nme+f=43e"pp_-f=43e"023DEN>/28>fl3gpp_ilca 2a href="drivers3011ev_asiz30vers/ata/li23drivers/a2"+9ode=a939ID_PR"3classca2"+9>023eak020" c>20" a> bufatef">_sealid_fl0cbreak;ref">atrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, <0241in>/26KIN3:024inscsi_sop_dev_astef"D="+code=rcdbscpg_bufflen="+cne" n"2pg_buf, <ppa_assscs_sear0244 C24KIN3:<<<<<<<<<_assscs_searpp_-f=o3e"024re+cmq_scs_sea href="drivers/9ke" n3me="9ufa>, [32]02430_3t>30_2pa9ea03 94ch si20" c>20"_2pa9>024, <024 C24KIN3:20"/a> 9keref">atr9ufa>, [32]024id="L3s2=2r19spa3194TIFYota3024id=>/////////////////* Alwayyyyyyyyy* No "+cogsubpages supzsc(ed (yet) but askingph/li_all_yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]024drivers/a2aa9aa 3d949ID_PR"3classca2aa9>024si.>/26">a3rb* copied backciyyyyyyyy* subpages .cs6bee a> byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]025id="L37202pa9ea03o950FW_REV3lass=c02pa9>025ci.>/26">a3rb* copied backciyyyyyyyy*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]025ta-s/3.c#2pa9ea03o95 lis /of inquo#2pa9>025op_dev_ascdba href="+code=rcdbscspgringad=2eti>/28spg, <20"/a> 9keref">atr9ufa>, [32]025aaaaa3i.c2pa9ea03i95"L1649"3PC-3 cc2pa9>025inscsi_sop_dev_astef"alid_fl0cbreak;ref">atrinvalparamflen="+cne" n"2atrinvalparam, <025fl3g<0" _qc_s href="+code=rcdbscpg_bufflen="+cne" n"2pg_buf, <,D="+code=rcdbscbufflen="+cne" n"2buf">ppa href="drivers30_7ev_asiz30_si.c#L162025s="sr3e F2 *9 si3e95="strin3lass=cF2 *9>0254 C24KIN3:<<<<<<<<atrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, <025>, <30_2"+9ode=i95_FW_REV3lass=c_2"+9>02p C24KIN3:/28pg, <025 C24KIN3:/28CACHE_MPAGE C1620" c>20"/a> 9k> 933trbufa>,02pid="L3s2=2am9="L3 95TIFYota3025DEN>/28>fl3g/28sc"dmsel8ppaf="+code=rcdbsca020" c>20" a> bufa>, <,a_assscs_sear025eak020" c>20" a> bufatef">_sealid_fl0cbreak;ref">atrinvalparamflen="+cne" n"2atrinvalparam, <0262ak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L162026ta-s/3.c#2r19spa3l96 lis /of inquc#2r19>026"+c>/28t">3* sp3n> 9"t"> * 9 026inscsi_sop_dedefault:0" c>20" a> bufa/ -scsi.cs6esingcres/atedatrinvagpage ref"y*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]026s="sr3e" 2r19spa3l963ID_PR"3classc 2r19>026 R/nmdn2 oputtef">ppaalid_fl0cbreak;ref">atrinvalparamflen="+cne" n"2atrinvalparam, <026>, <30_2na9e="3i96_FW_REV3lass=c_2na9>026 C24KIN3:20"/a> 9keref">atr9ufa>, [32]026id="L3s2=2 *9 si3n967FW_REV3lass=c=2 *9>026n c>/////////* Set tscid so444444444* Only onogpage hash_hangeablsidr9u,rillwsionly supzsc( settingponoyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]026id="L3s2=2 *9 si3n96TIFYota3026id=>/////////////////* Alway44444444* page ataa iimibyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<26drivers/a2 *9 si3n969ID_PR"3classca2 *9>026si.>/26">a3rb* copied backci44444444*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]027id="L37202 *9 si3 970FW_REV3lass=c02 *9>027ap_dev_ascdba href="+code=rcdbscbufflen="+cne" n"2buf">pp_ifa>,D="+code=rcdbscpg_bufflen="+cne" n"2pg_buf, <<)620" c>20"/a> 9keref">atr9ufa>, [32]027ta-s/3.c#2 *9 si3 97 lis /of inquc#2 *9>027//lvanocsi_sop_dev_asalid_fl0cbreak;ref">atrinvalparamflen="+cne" n"2atrinvalparam, <027, <02 op_dev_asis_mre3ann"0a href="drivers3012ev_asiz30 , 27bata-9cod2"+9ode=A97CID_PR"3classcd2"+9>027re+cmqfl0cbreak;ref">atrinvalid_fl0="+c020" c>20" a> bufa>, <<1620" c>20"/a> 9k> 933trbufa>,02730_3t>30_2r19spa3C97_FW_REV3lass=c_2r19>027 C24KIN3: b fielltis CDBth:"512 byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]027id="L3s2=2r19spa3C977FW_REV3lass=c=2r19>027 C24KIN3:/2d="1bns_ringad=2eti>/28sc"dd=">/2d="1bns_">ppascs t; *0278p_dev_asis_mre3ann"13e"0279, <20"02r19>0281in>/_fl0cbreak;ref">atrinvalparamflen="+cne" n"2atrinvalparam, <<1620" c>20"/a> 9k> 933trbufa>,028ta-s/3.c#2r19spa3"98 lis /of inquo#2r19>028re+cmtef">ppas sanity checkcfor pio muth:"51I" a> b fielltis parameter lis"th:"512 byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]028aaaaa3i.c2r19spa3"98"L1649"3PC-3 dc2r19>0282 C24KIN3:/2d="1bns_ringad=2eti>/28sc"dd=">/2d="1bns_">ppascs t; *028op_dev_asis_mre3ann"13e", 28bata-9cod2r19spa3"98CID_PR"3a>028re+cmqfl0cbreak;ref">atrinvalparam_bufflen="+cne" n"2atrinvalparam_buf, <<1620" c>20"/a> 9k> 933trbufa>,02830_3t>30_2"L972036986lis /of inquo_2"L9>028 C24KIN3:20"/a> 9keref">atr9ufa>, [32]028id="L3s2=2"+9ode="98lass="s3ring">=2"+9>028 C24KIN3:/2d="1bns_ringad=2eti>/28sc"dd=">/2d="1bns_">ppascs t; *0288p_dev_asis_mre3ann"13e"0289, <0291in>/_fl0cbreak;ref">skip167aetich simu skipdba 1620" c>20"/a> 9k> 933trbufa>,029ta-s/3.c#2r19spa3 99 lis /of inqu;#2r19>029re+cmtef">ppascs t; *029inscsi_sop_dere3ann"13e"20"F2"+9>029, <029hdca>tttttttt26a h3e * If4t/*myt#s 41620" c>20"/a> 301dev_asiz30csi.c#L16202930_3t>30_2"L97203 99ch si20" c>20"_2"L9>029 oputtttttttt26a h3e */liba ather csc"dge/_xlao_func - ci.cs6 hrSCSI"to c> is"+cla>etupis possiblsyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162029id="L3s2=2co9men3d99lass="s3IRYoVo=2co9>029n c>/////////* Set tscid so4ather c@dev: c> a hr="R/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162029id="L3s2=2co9men3d99ass="li3class==2co9>029id=>/////////////////* Alwaymther c@ :rSCSI"" name="opref"yto _+= iderR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162029drivers/a2am9;a3rb* copied backciaR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L16203"drivers/a3a30_de>30_dss="li3class="3ine" 30ci.>/26">a3rb* copied backcimKIN3:20"/a> 301dev_asiz30csi.c#L16203"1rivers/a3a19spa3 99 lis /of inqu;#3_irqs30e(hos26a h3e * co2 b sather cSCSI"" name="is clabeirs"+cla>Ld or simulatbdbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<302rivers/a3a19spa3199"L1649"3PC-3 "c3class30comms26a h3e */liba clas"+coaR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L16203aaaaaa3dca3 30_ <>30_ne" nam3="L16a23EN>/230ss="s26a h3e 26a h3e * 16-br ther cRETURNS:yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162033e"30_ame="20" c>20" 3> buf30e="Lttttttttt26a h3e *"line"ather cPointer clais"+cla>etupfunc>etupif possibls, %NULLpif notbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<305" *30hdca>tttttttt26a h3e * If4thabyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]03ata-s/35id3"30_er>30_6L1649"3PC-3 "l3nscsi30, <atass="sen="+cne" n"2atass=in>/_fl0cbreak;ref">sc"dxlao_func_ount="+crad1 <sc"dxlao_func_oin>/_fl0cbreak;ref">sc"dge/_xlao_funcunt="+crad1 <sc"dge/_xlao_func">ppastruccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * */gef="+code=ata_30c4ev_asiz30code=atu8cl3a9a-s/35id3"m9; *30eak020" c>20"switchref="+code=rcdbsccid167aetich simu a30csL1649"3PC-3 "l3nnscs31ap_dev_ascdbacasepf="+code=rcdbscREAD_6167aetich simu READ_6dba 1620" c>20"/a> 9k> 933trbufa>,0341rivers/a3130ver>30ct">/* FoM_S-3 (3o rs/31//lvanocsi_socasepf="+code=rcdbscREAD_ 30csi>30cs simu READ_1ap_de1620" c>20"/a> 9k> 933trbufa>,0342rivers/a3L30 <>30c" c>220" c>20" 3> buf31inscsi_sop_decasepf="+code=rcdbscREAD_ 6167aetich simu READ_16dba 1620" c>20"/a> 9k> 933trbufa>,034aaaaa3dca3a30cod>30c3L1649"3PC-3 "l3nscsi31lin>/26KIN3:30c="strin3lass="l3ne" n314nscsi_sop_decasepf="+code=rcdbscWRITE_6167aetich simu WRITE_6dba 1620" c>20"/a> 9k> 933trbufa>,0345" bu31re+cmq_scs_secasepf="+code=rcdbscWRITE_ 30csi>30cs simu WRITE_ 3dba 1620" c>20"/a> 9k> 933trbufa>,034ta-s/35id3ID_PR"3classoent"> * 2 3C24KI31 C24KIN3:20"/a> 9k> 933trbufa>,0347a-s/35id3L1920"31917">16893/a>/28/25a h3ef="+35>30_9ev_asiz30_9thd /span3sdrivers/a3"c9mme31910" c>20"/a>20"/a> 9k> 933trbufa>,032id="L37203>29"/a3<92an class="comm03>29>0322ak020" c>20" a> bufare3ann"/ntatchingeabloac"dd=">/write_s="c_xlaount="+crad1 <sc"dd=">/write_s="c_xlao, </* FoM_S-3 #3169>032"+c>/28t">3* sp3n> 9"t"> * 9 220" c>20"c3L19>032inscsi_sop_decasepf="+code=rcdbscSYNCHRONIZE_CACHEunt="+crad1 <SYNCHRONIZE_CACHEdba 1620" c>20"/a> 9k> 933trbufa>,032aaaaa3dca3am9="L3 92ne" nam3="L168 3am9>032 R/nmdn2 oputtef">ppa hre/ntatchingeablosc"dtry_flushss/sieunt="+crad1 <sc"dtry_flushss/sie">ppascs t; *20"/a> 9keref">atr9ufa>, [32]032e"0324 C24KIN3:<<<<<<<<< a> bufare3ann"/ntatchingeabloac"dd=">/flushsxlaount="+crad1 <sc"dd=">/flushsxlao, < 3<92CID_PR"3class=d3tu9>032eak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L162032ta-s/35id3ec9oto3l92_FW_REV3lass="_3ec9>032, <20"/a> 9k> 933trbufa>,0328a-s/35id3"c9mme3l92TIFYota30328 C24KIN3:20"/a> 9k> 933trbufa>,032drivers/a3"c9mme3a92ref="+c3ed ATSa3"c9>032eak020" c>20" a> bufare3ann"/ntatchingeabloac"dd=">/ 9ifysxlaount="+crad1 <sc"dd=">/ 9ifysxlao, <16893/a>0331in>/26KIN3:30c"EAM_EXTIFYL3dba 1620" c>20"/a> 9k> 933trbufa>,033aaaaa3i.c3 *9 si3e93"L1649"3PC-3 ac3 *9>033inscsi_sop_decasepf="+code=rcdbscTIFYL6167aetich simu TIFYL6dba 1620" c>20"/a> 9k> 933trbufa>,033aaaaa3dca3am9="L3a93ne" nam3="L16a 3am9>033 R/nmdn2 oputtef">ppare3ann"/ntatchingeabloac"dd=">/p3a9_thruunt="+crad1 <sc"dd=">/p3a9_thru, <033, <033re+cmq_scs_secasepf="+code=rcdbscMODE_SELECT1]rode=eef=e0)rMODE_SELECT>, <1620" c>20"/a> 9k> 933trbufa>,033ta-s/35id3ec9oto3d93_FW_REV3lass=9_3ec9>033 C24KIN3:30cs simu MODE_SELECT_ 3>, <1620" c>20"/a> 9k> 933trbufa>,033id="L3s2=3aa9aa 3i93lass="s3IRYoVo=3aa9>033to =2eti>/28ppa href="drivers30_8ev_asiz30_si.c#L1620338a-s/35id3"+9ode=a93TIFYota3033DEN>/28>fl3g0339, <034ap_dev_ascdbacasepf="+code=rcdbscSTART_STOPunt="+crad1 <START_STOP>, <1620" c>20"/a> 9k> 933trbufa>,034ta-s/3.c#316901 3e94 lis /of inquc#3169>034//lvanocsi_sop_dev_asre3ann"/ntatchingeabloac"dd=">/start/stop_xlaount="+crad1 <sc"dd=">/start/stop_xlao">ppa href="drivers30_8ev_asiz30_si.c#L162034aaaaa3i.c3r19spa3194"L1649"3PC-3 rc3r19>034inscsi_sop_dea href="drivers/9ke" n3me="9ufa>, [32]034s="sr3e" 3pa9ea03 94ne" nam3="L168 3pa9>034lin>/26KIN3:0344 C24KIN3:ppa href="drivers30_8ev_asiz30_si.c#L162034bata-9cod3tu9a> 3<94CID_PR"3class=d3tu9>034re+cma href="drivers/9ke" n3me="9ufa>, [32]034ta-s/35id3pa9ea03 94ch si20" c>20"_3pa9>034, <034n c>/////////* Set tscid so/*myt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162034id="L3s2=3r19spa3194TIFYota3034id=>/////////////////* AlwaymKIN3:_dump_cdb - dumpcSCSI"" name="cont Als cladmesgyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162034drivers/a3aa9aa 3d949ID_PR"3classca3aa9>034si.>/26">a3rb* copied backcimther c@ap: c> zsc( clawhichir e " name="was beingpseco">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162035id="L37203pa9ea03o950FW_REV3lass=c03pa9>035ci.>/26">a3rb* copied backcimther c@ :rSCSI"" name="cladump">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162035ta-s/3.c#3pa9ea03o95 lis /of inquo#3pa9>035e(hos26a h3e * co2 b sa">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162035aaaaa3i.c3pa9ea03i95"L1649"3PC-3 cc3pa9>035comms26a h3e */liba clas"+coather cPriAls c e " nt Als of arSCSI"" name="via priAlk()byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<35s="sr3e" 3 *9 si3e953ID_PR"3classc 3 *9>035ss="s26a h3e 26a h3e * 16-br byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]035s="sr3e F3 *9 si3e95="strin3lass=cF3 *9>035, <035>, <<32a>ic fl0cbreak;ref">atass="sen="+cne" n"2atass=in>/_voilt_assscs_sear_dump_cdbunt="+crad1 <sc"dd=">/dump_cdb">ppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *035:/cmc="+crad=2eti>/28d=">/cmc=R/nmd*ar * *035 Cgef="+code=ata_30c4ev_asiz30code=atu8cl3pid="L3s2=3am9="L3 95TIFYota3035DEN>/#ifdefpf="+code=rcdbscTIFYDEBUG167aetich simu TIFYDEBUG <035eak020" c>20"struccountatchingeablod=">/a hr="+c167aetich simd=">/a hr="R/nmd*ar * *id167aetich simu d=">id1, <0362ak020" c>20"/t_pc_nbrs/1vpau clLBA48="+c020"u8R/nmd*ar * *cid167aetich simu ">cide-scef=""drivers/atfa_cid167aetich simu a hra href="+code=r cmc="+crad=2eti>/28cmc=R/nm3e"/28t">3* sp3n> 9"t"> * 9 0362 C24KIN3:ppasC71PC-3 rs/astring">th:"51CDB (%u:%d,%d,%d) %02x %02x %02x %02x %02x %02x %02x %02x %02x\nth:"51yt#s 41, href="drivers30_5ev_asiz30_3trbufa>, 36s="sr3e" 3r19spa3l963ID_PR"3classc 3r19>036 R/nmdn2 oputtef">ppaar * */28priAl_i=R/nm, href="drivers30_5ev_asiz30_3trbufa>, 36s="sr3e F3pa9ea03"96="strin3lass=cF3pa9>0364 C24KIN3:<<<<<<<< * *id167aetich simu d=">id1, << hra href="+code=r channel"+crad=2eti>/28channel ma,id1, << hra href="+code=r i="+crad=2eti>/28i sc_,id1, << hra href="+code=r lufflen="+cne" n"2bunR/nm, href="drivers30_5ev_asiz30_3trbufa>, 36bata-9cod3r19spa3l96CID_PR"3classcd3r19>036eak020" c>20" a> bufaet_pc_nbrs/1vpad=">cid167aetich simu ">cide-sc[0],cide-sc[1],cide-sc[2],cide-sc[3], href="drivers30_5ev_asiz30_3trbufa>, 36ta-s/35id3na9e="3i96_FW_REV3lass=c_3na9>036:cid167aetich simu ">cide-sc[4],cide-sc[5],cide-sc[6],cide-sc[7], href="drivers30_5ev_asiz30_3trbufa>, 36id="L3s2=3 *9 si3n967FW_REV3lass=c=3 *9>036to =2eti>/28cide-sc[8]a3e"036id=>/#endife"036si.>/a href="drivers/9ke" n3me="9ufa>, [32]037id="L37203 *9 si3 970FW_REV3lass=c03 *9>0371in>/26KIN3:atass="sen="+cne" n"2atass=in>/_iscountatchingeablo__sc"dd=">/queuecid167aetich simu __sc"dd=">/queuecid">ppastruccountatchingeablod=">/cmc="+crad=2eti>/28d=">/cmc=R/nmd*ar * *037inscsi_sop_dev_astef" struccountatchingeabloac"da hr="+c167aetich simsc"da hr="R/nmd*ar * *03 op_degef="+code=ata_30c4ev_asiz30code=atu8cl37s="sr3e F3aa9aa 3a97="strin3lass=cF3aa9>03 " c>20"/3> /t_pc_nbrs/1vpau clLBA48="+c020"u8R/nmduntatchingeablod=">/op167aetich simu s=">/ope-scef=""drivers/atfa_scid167aetich simu a hra href="+code=r cmc="+crad=2eti>/28cmc=R/nm[0]3e"037re+cmq_scs_sear * */_fl0cbreak;ref">xlao_funcunt="+crad1 <xlao_func">pp3e"037 C href="drivers3012ev_asiz30 0378p_dev_asis_m hre/ntatchingeabloid167aetich simu ma hra href="+code=r cetic"+crad=2eti>/28crad=e-scefOT_assscs_sear037eak020" c>20" a> bufa hre/ntatchingeabloutaskelyclLBA48="+c020"utaskely">ppaistaskfilsgef=""d=id167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba h|i clDEVICEccccccgscid167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba hifa>,D="+code=rcdbscid167aetich simu ma hra href="+code=r cdb_bufflen="+cne" n"2cdb_buf ma20"/a> 9keref">atr9ufa>, [32]038id="L37203r19spa3i98=atrs20" c>20"03r19>0382ak020" c>20" a> bufat6issue alid_fl0cbreak;ref">bad_cdb_bufflen="+cne" n"2bad_cdb_buf">pp3e"038"+c>/28t">3* sp3n> 9"t"> * 9 038inscsi_sop_dev_astef"D="+code=rcdbscxlao_funcunt="+crad1 <xlao_func">ppef=""drivers/atfa_ac"dge/_xlao_funcunt="+crad1 <sc"dge/_xlao_func">ppaD="+code=rcdbscid167aetich simu ma,/ope-sca3e"038op_dev_asis_m} elsepgef="+code=ata_30c4ev_asiz30code=atu8cl38s="sr3e F3r19spa3i98="strin3lass=oF3r19>03r4 C24KIN3:<<<<<<<<< hre/ntatchingeabloutaskelyclLBA48="+c020"utaskely">ppaistaskfilsgef=""d=id167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba 20"/a> 9keref">atr9ufa>, [32]038bata-9cod3r19spa3"98CID_PR"3a>038eak020" c>20" a> bufat6issue alid_fl0cbreak;ref">bad_cdb_bufflen="+cne" n"2bad_cdb_buf">pp3e"038, <=3"+9>038to =2eti>/28ppef=""drivers/atfa_NULLunt="+crad1 <NULL">ppa href="drivers30_8ev_asiz30_si.c#L162038id="L3s2=3r19spa3D98ass="li3class==3r19>038DEN>/28>fl3gppaa""drivers/atfa_sc">/op167aetich simu s=">/ope-sceROT_assscs_sear/p3a9thruL6167aetich simu 30_p>/p3a9thruL6dba 20" a> bufatef">_se/ sanity checkcfor pio murelayrSCSI"" name="claTIFPI a hr="r byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]039id="L37203r19spa3199an class="comm03r19>0392ak020" c>20" a> bufat6issue iscountatchingeablobufflen="+cne" n"2buf">pp_OTuntatchingeabloCOMMAND_SIZEunt="+crad1 <COMMAND_SIZE">ppaD="+code=rcdbscd=">/op167aetich simu s=">/ope-sca3e"_se hre/ntatchingeabloutaskelyclLBA48="+c020"utaskely">ppauntatchingeablobufflen="+cne" n"2buf">pp_ifa>,D="+code=rcdbscd=id167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba h|i clDEVICEccccccgbufflen="+cne" n"2buf">pp_ifa>,D="+code=rcdbscid167aetich simu ma hra href="+code=r cdb_bufflen="+cne" n"2cdb_buf ma20"/a> 9keref">atr9ufa>, [32]039aaaaa3i.c3r19spa3199"L1649"3PC-3 "c3r19>039inscsi_sop_dev_astef" alid_fl0cbreak;ref">bad_cdb_bufflen="+cne" n"2bad_cdb_buf">pp3e"20"F3"+9>0394 C24KIN3:<<<<<<<<< a> bufaD="+code=rcdbscxlao_funcunt="+crad1 <xlao_func">ppef=""drivers/atfa_ac"p>/xlaount="+crad1 <sc"p>/xlao">pp3e"039eak020" c>20" a> bufa} elsepgef="+code=ata_30c4ev_asiz30code=atu8cl3930_3t>30_3"L97203 99ch si20" c>20"_3"L9>039: " name=" byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]039id="L3s2=3co9men3d99lass="s3IRYoVo=3co9>039to =2eti>/28_se hre/ntatchingeabloutaskelyclLBA48="+c020"utaskely">ppauntatchingeabloscid167aetich simu a hra href="+code=r cmd_bufflen="+cne" n"2cmd_bufdba hifa>,1620"/a> 9keref">atr9ufa>, [32]039id="L3s2=3co9men3d99ass="li3class==3co9>039DEN>/28>fl3gbad_cdb_bufflen="+cne" n"2bad_cdb_buf">pp3e"0399, <30_dss="li3class="4ine" 402ak020" c>20" a> bufat6issue D="+code=rcdbscxlao_funcunt="+crad1 <xlao_func">ppef=""drivers/atfa_ac"dge/_xlao_funcunt="+crad1 <sc"dge/_xlao_func">ppaD="+code=rcdbscid167aetich simu ma,/ope-sca3e"30_ame="20" c>20" 4> buf404 C24KIN3:< href="+code=rcdbscxlao_funcunt="+crad1 <xlao_func">ppa620" c>20"/a> 9keref">atr9ufa>, [32]0405" *40eak020" c>20" a> bufaet_pc_nbrs/1vparcunt="+crad1 <rce-scef=""drivers/atfa_ac"ds=">/rs"+cla>Lunt="+crad1 <sc"ds=">/rs"+cla>L">ppaD="+code=rcdbscid167aetich simu ma,ppa3e"20"_4nscsi40:/28ppaD="+code=rcdbscid167aetich simu ma,/25a h3ef="+35>30_9ev_asiz30_9thd /span4a9a-s/35id4"m9; *40eak020" c>20"re3ann"/ntatchingeablorcunt="+crad1 <rce-sc3e"30csL1649"3PC-3 "l4nnscs411in>/26KIN3:/* FoM_S-3 (4o rs/41//lvanfl0cbreak;ref">bad_cdb_bufflen="+cne" n"2bad_cdb_buf">pp1620" c>20"/a> 9k> 933trbufa>,0442rivers/a4L30 <>30c" c>220" c>20" 4> buf412 C24KIN3:ppasC71PC-3 rs/astring">th:"51bad CDB buf=%u, s=">/op=0x%02x, max=%u\nth:"51yt#s 41, href="drivers30_5ev_asiz30_3trbufa>, 44aaaaa3dca4a30cod>30c3L1649"3PC-3 "l4nscsi41 R/nmdn2 oputtef">ppa_assscs_sear/ope-sc,30c="strin3lass="l4ne" n41" c>20"/3> /t_pc_nbrs/1vpascid167aetich simu a hra href="+code=r resul"unt="+crad1 <resul", < bu41re+cmq_scs_sear * */aos="sen="+cne" n"2d=">/aos=">ppauntatchingeabloscid167aetich simu a<3e" * 2 4C24KI41 C24KIN3:16893/a>/25a h3ef="+35>30_9ev_asiz30_9thd /span4sdrivers/a4"c9mme31910" c>20"/a>/26">a3rb* copied backc/*myt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162042id="L37204>29"/a3<92an class="comm04>29>042ci.>/26">a3rb* copied backcimther csc"dd=">/queuecid - Issue SCSI""db"clasiz30csmanaged a hr="R/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162042ta-s/3.c#416901 3"92t">/* FoM_S-3 #4169>042e(hos26a h3e * co2 b sather c@shost:rSCSI"host of " name="clabepseco">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162042aaaaa3i.c4L1920"3692" c>220" c>20"c4L19>042comms26a h3e */liba clas"+coather c@ :rSCSI"" name="clabepseco">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162042aaaaa3dca4am9="L3 92ne" nam3="L168 4am9>042ss="s26a h3e 26a h3e * 16-br ">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162042e"042e="Lttttttttt26a h3e *"line"ather cIn someacases, thispfunc>etuprs"+cla>LsrSCSI"" name=s isco">#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620425" 3<92CID_PR"3class=d4tu9>042hdca>tttttttt26a h3e * If4thather c c> iaskfiles, me="queues c e iaskfiles"clabepseco co">#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620426"#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620427a-s/35id4aa9aa 3n92lass="s3IRYoVP=4aa9>042n c>/////////* Set tscid so4ather cSCSI"a hr="rby evaluatingpme="respondingpto _ertain">#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620428a-s/35id4"c9mme3l92TIFYota3042id=>/////////////////* AlwaymKIN3:#s 41620" c>20"/a> 301dev_asiz30csi.c#L162042drivers/a4"c9mme3a92ref="+c3ed ATSa4"c9>042si.>/26">a3rb* copied backcimther c c> me="TIFPI a hr="s appearingpmscSCSI"a hr="sbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<43id="L37204"L97203 939">16893/a>043ci.>/26">a3rb* copied backcimyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<43ta-s/3.c#4L192033i93ode=scr3/aion/#4L19>043e(hos26a h3e * co2 b sather cLOCKING:yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162043aaaaa3i.c4 *9 si3e93"L1649"3PC-3 ac4 *9>043comms26a h3e */liba clas"+coather c c> host lockyt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162043aaaaa3dca4am9="L3a93ne" nam3="L16a 4am9>043ss="s26a h3e 26a h3e * 16-br ">#s 41620" c>20"/a> 301dev_asiz30csi.c#L162043e"043e="Lttttttttt26a h3e *"line"ather cRETURNS:yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162043bata-9cod4tu9a> 3"93CID_PR"3a>043hdca>tttttttt26a h3e * If4thather cRe3ann"value from __sc"dd=">/queuecid()< hr@ canabepqueued,yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620436"043 oputtttttttt26a h3e */liba ather c0 ogth:wisibyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<43id="L3s2=4aa9aa 3i93lass="s3IRYoVo=4aa9>043n c>/////////* Set tscid so4abyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0438a-s/35id4"+9ode=a93TIFYota3043DEN>/iscountatchingeablosc"dd=">/queuecidunt="+crad1 <sc"ds=">/queuecid">ppastruccountatchingeabloS=">/Hostunt="+crad1 <S=">/Host C2*ar * */28d=">/cmc=R/nmd*ar * *0439, <044ap_dev_ascdbastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *044inscsi_sop_destruccountatchingeablod=">/a hr="+c167aetich simd=">/a hr="R/nmd*ar * *id167aetich simu d=">id1, </28irq_flagcR/nma href="drivers30_8ev_asiz30_si.c#L162044bata-9cod4tu9a> 3<94CID_PR"3class=d4tu9>044>, <20"_4pa9>044 C24KIN3: * *ppauntatchingeabloshostunt="+crad1 <shoste-sc<3e"044 C href="drivers3012ev_asiz30 0448 C24KIN3: * *ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r lockflen="+cne" n"2bockytsc,/28irq_flagcR/nm<3e"0449, <20"/t_pc_nbrs/1vpaac"dd=">_dump_cdbunt="+crad1 <sc"dd=">/dump_cdb">ppauntatchingeabloap167aetich simu apR/nm,/28t">3* sp3n> 9"t"> * 9 0452 C24KIN3:ppauntatchingeabloap167aetich simu apR/nm,id1, <<<3e"045fl3g<0" _qc_s href="+code=rcdbscbskelyclLBA48="+c020"askely">ppa/ntatchingeabloid167aetich simu ma20"/a> 9keref">atr9ufa>, [32]045s="sr3e F4 *9 si3e95="strin3lass=cF4 *9>0454 C24KIN3:<<<<<<<< * *ppa/t_pc_nbrs/1vpacid167aetich simu a,045re+cmq_scs_seelsepgef="+code=ata_30c4ev_asiz30code=atu8cl45ta-s/35id4"+9ode=i95_FW_REV3lass=c_4"+9>045:045to =2eti>/28/aos="sen="+cne" n"2d=">/aos=">ppauntatchingeablocid167aetich simu a<3e"0458 C24KIN3:0459, <0462ak020" c>20"/t_pc_nbrs/1vpadpin_unlock_irqrestor"+c167aetich simdpin_unlock_irqrestor"">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r lockflen="+cne" n"2bockytsc,/28irq_flagcR/nm<3e"/28t">3* sp3n> 9"t"> * 9 046inscsi_sop_dere3ann"/ntatchingeablorcunt="+crad1 <rce-sc3e"046 R/nma href="drivers/9ke" n3me="9ufa>, [32]046s="sr3e F4pa9ea03"96="strin3lass=cF4pa9>046, <046hdca>tttttttt26a h3e * If4t/*myt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162046ta-s/35id4na9e="3i96_FW_REV3lass=c_4na9>046 oputtttttttt26a h3e */liba ather csc"ds=">/simulatb -psimulatbrSCSI"" name="on c> a hr="R/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162046id="L3s2=4 *9 si3n967FW_REV3lass=c=4 *9>046n c>/////////* Set tscid so4ather c@dev: c e iarget a hr="R/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162046id="L3s2=4 *9 si3n96TIFYota3046id=>/////////////////* Alwaymther c@ :rSCSI"" name="beingpseco"clad hr="byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<46drivers/a4 *9 si3n969ID_PR"3classca4 *9>046si.>/26">a3rb* copied backciaR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162047id="L37204 *9 si3 970FW_REV3lass=c04 *9>047ci.>/26">a3rb* copied backcimther cInterpre3s tialdirectly executbs a sel820"/a> 301dev_asiz30csi.c#L162047ta-s/3.c#4 *9 si3 97 lis /of inquc#4 *9>047e(hos26a h3e * co2 b sather cthat canabephme=leltisternallybyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<47aaaaa3i.c4"+9ode=i97"L1649"3PC-3 cc4"+9>047comms26a h3e */liba clas"+coaR/#s 41620" c>20"/a> 301dev_asiz30csi.c#L162047s="sr3e" 4 19 st3e973ID_PR"3classc 4 19>047ss="s26a h3e 26a h3e * 16-br ther cLOCKING:yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162047s="sr3e F4aa9aa 3a97="strin3lass=cF4aa9>047e="Lttttttttt26a h3e *"line"ather cdpin_lock_irqsav"(host lock)yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162047bata-9cod4"+9ode=A97CID_PR"3classcd4"+9>047hdca>tttttttt26a h3e * If4thabyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]047ta-s/35id4r19spa3C97_FW_REV3lass=c_4r19>047, <047 Cvoilt_assscs_sear_simulatbunt="+crad1 <sc"ds=">/simulatb">ppastruccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * */28d=">/cmc=R/nmd*ar * *047DEN>/gef="+code=ata_30c4ev_asiz30code=atu8cl47drivers/a4"+9ode=A97ref="+c3ed ATSa4"+9>047eak020" c>20"struccountatchingeablosc"ds=">/argc"+crad=2eti>/28sc"ds=">/argcak020untatchingeablosrgc"+crad=2eti>/28srgcR/nma href="drivers30_8ev_asiz30_si.c#L162048id="L37204r19spa3i98=atrs20" c>20"04r19>0482ak020" c>20"_+= countatchingeablou clLBA48="+c020"u8R/nmd*ar * *cid167aetich simu ">cide-scef=""drivers/atfa_cid167aetich simu a hra href="+code=r cmc="+crad=2eti>/28cmc=R/nm3e"048//lvanocsi_sountatchingeablou clLBA48="+c020"u8R/nmduntatchingeablotmp clLBA48="+c020"tmp R/nm3e"048inscse"048op_dev_asis_muntatchingeablosrgc"+crad=2eti>/28srgcR/nm./ntatchingeabloid167aetich simu maef=""drivers/atfa_id167aetich simu maa href="drivers3012ev_asiz30 /28srgcR/nm./ntatchingeabloi="+crad=2eti>/28i sc_ef=""drivers/atfa_id167aetich simu ma hra href="+code=r i="+crad=2eti>/28i sc_a href="drivers3012ev_asiz30 048re+cmq_scs_sear * */28srgcR/nm./ntatchingeablocid167aetich simu aef=""drivers/atfa_cid167aetich simu aa href="drivers3012ev_asiz30 048 C24KIN3: * */28srgcR/nm./ntatchingeabloios="sen="+cne" n"2aos=">ppef=""drivers/atfa_cid167aetich simu a hra href="+code=r d=">/aos="sen="+cne" n"2d=">/aos=">ppa href="drivers3012ev_asiz30 =4"+9>048 C href="drivers3012ev_asiz30 048DEN>/28>fl3gcid167aetich simu ">cide-sc[0]apgef="+code=ata_30c4ev_asiz30code=atu8cl48drivers/a4r19spa3D98ref="+c3abl//(a4r19>048eak020" c>20"/ sanity checkcfor pio muTODO: worth improving?habyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]049id="L37204r19spa3199an class="comm04r19>049ap_dev_ascdbacasepf="+code=rcdbscFORMAT_UNIT1]rode=eef=e0)rFORMAT_UNITp_de1620" c>20"/a> 9k> 933trbufa>,049ta-s/3.c#4r19spa3 99 lis /of inqu;#4r19>049//lvanocsi_sop_dev_asuntatchingeablosc"ds=">/invalid_fieldunt="+crad1 <sc"ds=">/invalid_field">ppauntatchingeablocid167aetich simu a<3e"049inscsi_sop_dev_astef"breaka href="drivers30_8ev_asiz30_si.c#L162049s="sr3e" 4 *9 si3<99ne" nam3="L168 4 *9>049lin>/26KIN3:20"F4"+9>0494 C24KIN3:20"/a> 9k> 933trbufa>,049bata-9cod4"+9ode="995lis /of inqu;d4"+9>049eak020" c>20" a> bufa href="+code=rcdbscd=">cid167aetich simu ">cide-sc[1] & 2)nocsi_sop_dev_asu sanity checkcfor pio muis CmdDt set? habyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]049ta-s/35id4"L97203 99ch si20" c>20"_4"L9>049:/invalid_fieldunt="+crad1 <sc"ds=">/invalid_field">ppauntatchingeablocid167aetich simu a<3e"049to =2eti>/28cid167aetich simu ">cide-sc[1] & 1)efOT0)v_asu sanity checkcfor pio muis EVPDityear?habyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]049id="L3s2=4co9men3d99ass="li3class==4co9>049DEN>/28>fl3g/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,049eak020" c>20" a> bufaelsepswitchref="+code=rcdbscd=">cid167aetich simu ">cide-sc[2]apgef="+code=ata_30c4ev_asiz30code=atu8cl5"drivers/a5a30_de>30_dss="li3class="5ine" 502ak020" c>20" a> bufacasep0x001620" c>20"/a> 9k> 933trbufa>,05"1rivers/a5a19spa3 99 lis /of inqu;#5_irqs50//lvanocsi_sop_dev_as /ntatchingeablosc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,ppacasep0x801620" c>20"/a> 9k> 933trbufa>,05"4aaaa3dca5 +9ode="99ame="20" c>20"F5> buf504 C24KIN3:<<<<<<<<< /ntatchingeablosc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm, *50eak020" c>20" a> bufa breaka href="drivers30_8ev_asiz30_si.c#L16205a6aaaa3dca5 L97203 99ch si20" c>20"_5nscsi50:20"/a> 9k> 933trbufa>,05"7aaaa3dca5 o9men3d99lass="s3IRYoVo=5pagea50to =2eti>/28/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,/28>fl3g *50eak020" c>20" a> bufacasep0x891620" c>20"/a> 9k> 933trbufa>,054id="L37205 30csi>30csL1649"3PC-3 "l5nnscs512ak020" c>20" a> bufat6issue D="+code=rcdbscsc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,/* FoM_S-3 (5o rs/51//lvanocsi_sop_dev_as breaka href="drivers30_8ev_asiz30_si.c#L1620542rivers/a5L30 <>30c" c>220" c>20" 5> buf51inscsi_sop_dev_astef"casep0xb01620" c>20"/a> 9k> 933trbufa>,054aaaaa3dca5a30cod>30c3L1649"3PC-3 "l5nscsi51 R/nmdn2 oputtef">ppat6issue D="+code=rcdbscsc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,30c="strin3lass="l5ne" n514 C24KIN3:<<<<<<<<< breaka href="drivers30_8ev_asiz30_si.c#L1620545aaaa3dca5=30riv2T250_5ev_asiMD_REA5a> bu51eak020" c>20" a> bufacasep0xb11620" c>20"/a> 9k> 933trbufa>,0546aaaa3dca5ID_PR"3classoent"> * 2 5C24KI51:/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,16893/a>/28/28>fl3g20"/a> 9k> 933trbufa>,0549aaaa3dca5"c9mme31910" c>20"/a>20" a> bufatef">_se/ntatchingeablosc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,29"/a3<92an class="comm05>29>0522ak020" c>20" a> bufat6issue breaka href="drivers30_8ev_asiz30_si.c#L162052ta-s/3.c#516901 3"92t">/* FoM_S-3 #5169>052//lvanocsi_sop_dev_asdefault1620" c>20"/a> 9k> 933trbufa>,052aaaaa3i.c5L1920"3692" c>220" c>20"c5L19>052inscsi_sop_dev_astef" /ntatchingeablosc"ds=">/invalid_fieldunt="+crad1 <sc"ds=">/invalid_field">ppauntatchingeablocid167aetich simu a<3e"ppat6issue breaka href="drivers30_8ev_asiz30_si.c#L162052e"0524 C24KIN3:<<<<<<<< 3<92CID_PR"3class=d5tu9>052eak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L1620526aaaa3dca5ec9oto3l92_FW_REV3lass="_5ec9>052, <052to =2eti>/2820"/a> 9k> 933trbufa>,0528a-s/35id5"c9mme3l92TIFYota30528o =2eti>/2830_dd1 <MODE_SENSE_13p_de1620" c>20"/a> 9k> 933trbufa>,0529aaaa3dca5"c9mme3a92ref="+c3ed ATSa5"c9>052eak020" c>20" a> bufa/ntatchingeablosc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,16893/a>0532ak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L162053ta-s/3.c#5L192033i93ode=scr3/aion/#5L19>053"+c>/28t">3* sp3n> 9"t"> * 9 0532o =2eti>/2820"/a> 9k> 933trbufa>,053aaaaa3dca5am9="L3a93ne" nam3="L16a 5am9>053 R/nmdn2 oputtef">ppaar * */rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,0534 C24KIN3:<<<<<<<< 3"93CID_PR"3a>053>, <0536o =2eti>/2820"/a> 9k> 933trbufa>,0537a-s/35id5aa9aa 3i93lass="s3IRYoVo=5aa9>053to =2eti>/28cid167aetich simu ">cide-sc[1] & 0x1f)efOT_assscs_sear20"/a> 9k> 933trbufa>,0538a-s/35id5"+9ode=a93TIFYota3053DEN>/28>fl3g/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,053eak020" c>20" a> bufaelsee"0542ak020" c>20" a> bufat6issue D="+code=rcdbscsc"ds=">/invalid_fieldunt="+crad1 <sc"ds=">/invalid_field">ppauntatchingeablocid167aetich simu a<3e"054inscse"20"/a> 9k> 933trbufa>,054s="sr3e F5:h9r m3e94="strin3lass="F5:h9>0544 C24KIN3:<<<<<<<</rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,/28sc"ds=">op/rezsc(_lunc a<3e" 3<94CID_PR"3class=d5tu9>054eak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L162054ta-s/35id5pa9ea03 94ch si20" c>20"_5pa9>054, <054to =2eti>/2820"/a> 9k> 933trbufa>,0548a-s/35id5r19spa3194TIFYota3054DEN>/28>fl3gppauntatchingeablocid167aetich simu a, 0, 0, 0<3e"054eak020" c>20" a> bufa/ntatchingeablocid167aetich simu a hra href="+code=r resul"unt="+crad1 <resul", <0552ak020" c>20" a> bufa/ntatchingeablocid167aetich simu a hra href="+code=r s=">/aos="sen="+cne" n"2d=">/aos=">ppauntatchingeablocid167aetich simu a<3e"055inscse"055fl3g<0" _qc_su sanity checkcfor pio muif we reach this, then writeback20"/a> 301dev_asiz30csi.c#L162055s="sr3e F5 *9 si3e95="strin3lass=cF5 *9>055e="Lttttttttt26a h3e *"line"""""""""* 3anningpthispisco a no-opbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<55bata-9cod5"+9ode=i95CID_PR"3classod5"+9>055hdca>tttttttt26a h3e * If4th""""""""*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]055ta-s/35id5"+9ode=i95_FW_REV3lass=c_5"+9>0556o =2eti>/2820"/a> 9k> 933trbufa>,055id="L3s2=5"+9ode=i957FW_REV3lass=c=5"+9>055to =2eti>/2820"/a> 9keref">atr9ufa>, [32]0558a-s/35id5am9="L3 95TIFYota3055 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span55drivers/a5"+9ode=<959ID_PR"3classca5"+9>055eak020" c>20"/ sanity checkcfor pio muno-op's, kcfplete with success"*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]056id="L37205aa9aa 3"960FW_REV3lass=c05aa9>056ap_dev_ascdbacasepf="+code=rcdbscREZERO_UNIT1]rode=eef=e0)rREZERO_UNITp_de1620" c>20"/a> 9k> 933trbufa>,056ta-s/3.c#5r19spa3l96 lis /of inquc#5r19>0561o =2eti>/2820"/a> 9k> 933trbufa>,056aaaaa3i.c5r19spa3l96"L1649"3PC-3 cc5r19>0562o =2eti>/2830_dd1 <SEEK_13p_de1620" c>20"/a> 9k> 933trbufa>,056s="sr3e" 5r19spa3l963ID_PR"3classc 5r19>056fl3g<0" _qc_scasepf="+code=rcdbscTEST_UNIT_READYunt="+crad1 <TEST_UNIT_READYp_de1620" c>20"/a> 9k> 933trbufa>,056s="sr3e F5pa9ea03"96="strin3lass=cF5pa9>0564 C24KIN3:<<<<<<<</rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,056eak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L162056ta-s/35id5na9e="3i96_FW_REV3lass=c_5na9>056, <056to =2eti>/2830_dd1 <SEND_DIAGNOSTICp_de1620" c>20"/a> 9k> 933trbufa>,0568a-s/35id5 *9 si3n96TIFYota3056DEN>/28>fl3gcide-sc[1] & ~(1eiscdba hr3<3e"056eak020" c>20" a> bufa hreef="+code=rcdbsctmp clLBA48="+c020"tmp R/nmef= 0x4) && aistaskfilsgef=""d=">cid167aetich simu ">cide-sc[3]) && aistaskfilsgef=""d=">cid167aetich simu ">cide-sc[4]20"/a> 9keref">atr9ufa>, [32]057id="L37205 *9 si3 970FW_REV3lass=c05 *9>0572ak020" c>20" a> bufat6issue D="+code=rcdbscsc"ds=">/rbuf_fill"+crad=2eti>/28sc"ds=">/rbuf_fill">ppa&/r * */28srgcR/nm,057inscsi_sop_dev_astef" /ntatchingeablosc"ds=">/invalid_fieldunt="+crad1 <sc"ds=">/invalid_field">ppauntatchingeablocid167aetich simu a<3e"057 R/nmdn2 oputtef">ppabreaka href="drivers30_8ev_asiz30_si.c#L162057s="sr3e F5aa9aa 3a97="strin3lass=cF5aa9>057, <057re+cmq_scs_sea sanity checkcfor pio muall ogth: c name=s *byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]057ta-s/35id5r19spa3C97_FW_REV3lass=c_5r19>0576o =2eti>/2820"/a> 9k> 933trbufa>,057id="L3s2=5r19spa3C977FW_REV3lass=c=5r19>057to =2eti>/28ppauntatchingeablocid167aetich simu a, untatchingeabloILLEGAL_REQUEST167aetich simu ILLEGAL_REQUEST a, 0x20, 0x0<3e"057DEN>/28>fl3g20"/a> 9keref">atr9ufa>, [32]057drivers/a5"+9ode=A97ref="+c3ed ATSa5"+9>057eak020" c>20" a> bufa/ntatchingeablocid167aetich simu a hra href="+code=r s=">/aos="sen="+cne" n"2d=">/aos=">ppauntatchingeablocid167aetich simu a<3e"20"05r19>0582ak020" c>20" a> bufabreaka href="drivers30_8ev_asiz30_si.c#L162058ta-s/3.c#5r19spa3"98 lis /of inquo#5r19>058//lvanocsi_soa href="drivers/9ke" n3me="9ufa>, [32]058aaaaa3i.c5r19spa3"98"L1649"3PC-3 dc5r19>058inscsa href="drivers/9ke" n3me="9ufa>, [32]058s="sr3e" 5"+9ode="98ne" nam3="L168 5"+9>058lin>/26KIN3:/28sc"ds=">/add_hostc">ppastruccountatchingeablosc"dhostunt="+crad1 <sc"dhost/lvan*ar * *20"/a> 9k> 933trbufa>,058bata-9cod5r19spa3"98CID_PR"3a>058re+cmgef="+code=ata_30c4ev_asiz30code=atu8cl58ta-s/35id5"L972036986lis /of inquo_5"L9>058 C24KIN3:=5"+9>058 C href="drivers3012ev_asiz30 058DEN>/28>fl3g/28ndzsc(ce-sc3ountatchingeabloiunt="+crad1 <i a++apgef="+code=ata_30c4ev_asiz30code=atu8cl58drivers/a5r19spa3D98ref="+c3abl//(a5r19>058eak020" c>20" a> bufastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * */28zsc(ce-sc[untatchingeabloiunt="+crad1 <i a]3e"20" a> bufastruccountatchingeabloS=">/Hostunt="+crad1 <S=">/Host C2*ar * */28t">3* sp3n> 9"t"> * 9 059inscsi_sop_dev_astef"untatchingeablorcunt="+crad1 <rce-scef=-untatchingeabloENOMEMunt="+crad1 <ENOMEMe-sc3e"ppa_assscs_searppauntatchingeabloshtunt="+crad1 <sht a,20"F5"+9>0594 C24KIN3:<<<<<<<<< hreistaskfilsgef=""dhostunt="+crad1 <shoste-sc059eak020" c>20" a> bufaaaaaaaaagotoountatchingeabloerr_allocunt="+crad1 <err_alloce-sc3e"20"_5"L9>059, <059to =2eti>/28059DEN>/28>fl3g * *059eak020" c>20" a> bufa""drivers/atfa_ap167aetich simu apR/nm hra href="+code=r s=">/hostunt="+crad1 <s=">/hoste-scef=""drivers/atfa_dhostunt="+crad1 <shoste-sc3e"30_dss="li3class="6ine" 602ak02e" * * * */28unique_i=e-scef=""drivers/atfa_sp167aetich simu apR/nm hra href="+code=r prisc_i="+crad=2eti>/28prisc_i=e-sc3e"ppa/r * */28max_i=e-scef=163e"20"F6> buf604 C24KIN3:<<<<<<<< * */28max_lune-scef=13e" *60eak020" c>20" a> bufa/r * */28max_channele-scef=13e"20"_6nscsi60: * */28max_cmd_lene-scef=163e"/28>fl3g20"/a> 301dev_asiz30csi.c#L16206a9aaaa3dca6 m9; *60si.>/26">a3rb* copied backci28>fl3g20"/a> 30_2ev_asiz30_fa>, [32]<64id="L37206 30csi>30csL1649"3PC-3 "l6nnscs61ci.>/26">a3rb* copied backci28>fl3g20"/a> 30_2ev_asiz30_fa>, [32]<641rivers/a6130ver>30ct">/* FoM_S-3 (6o rs/61e(hos26a h3e * co2 b s28>fl3g20"/a> 30_2ev_asiz30_fa>, [32]<642rivers/a6L30 <>30c" c>220" c>20" 6> buf61comms26a h3e */liba clas"+co28>fl3g20"/a> 9keref">atr9ufa>, [32]064aaaaa3dca6a30cod>30c3L1649"3PC-3 "l6nscsi61 R/nmdn2 oputtef">ppa/r * */28max_host_blockede-scef=13e"30c="strin3lass="l6ne" n61, <20" a> bufauntatchingeablorcunt="+crad1 <rce-scef=href="+code=r s=">/add_host_with_dm"unt="+crad1 <s=">/add_host_with_dm"">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r s=">/hostunt="+crad1 <s=">/hoste-sc, href="drivers30_5ev_asiz30_3trbufa>, 646aaaa3dca6ID_PR"3classoent"> * 2 6C24KI61: * *16893/a>/28/28>fl3g/28err_adde-sc3e"20"/a>20"a href="drivers/9ke" n3me="9ufa>, [32]062id="L37206>29"/a3<92an class="comm06>29>0622ak02e"/* FoM_S-3 #6169>062//lvanocsi_sore3ann"0a href="drivers3012ev_asiz30 220" c>20"c6L19>062inscse"/28err_adde-sc1620" c>20"/a> 9k> 933trbufa>,062e"0624 C24KIN3:<""drivers/atfa_d=">/host_putunt="+crad1 <s=">/host_put">ppauntatchingeablohostunt="+crad1 <hoste-sc hra href="+code=r zsc(c"+crad=2eti>/28zsc(ce-sc[untatchingeabloiunt="+crad1 <i a] hra href="+code=r s=">/hostunt="+crad1 <s=">/hoste-sc<3e" 3<92CID_PR"3class=d6tu9>062eak020untatchingeabloerr_allocunt="+crad1 <err_alloce-sc1620" c>20"/a> 9k> 933trbufa>,0626aaaa3dca6ec9oto3l92_FW_REV3lass="_6ec9>062:062to =2eti>/28/Hostunt="+crad1 <S=">/Host C2*ar * */28zsc(ce-sc[untatchingeabloiunt="+crad1 <i a] hra href="+code=r s=">/hostunt="+crad1 <s=">/hoste-sc3e"062 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span629aaaa3dca6"c9mme3a92ref="+c3ed ATSa6"c9>062eak020" c>20" a> bufa/ntatchingeablos=">/remove/hostunt="+crad1 <s=">/remove/host">ppauntatchingeabloshostunt="+crad1 <shoste-sc<3e"16893/a>0632ak020" c>20" a> bufa""drivers/atfa_d=">/host_putunt="+crad1 <s=">/host_put">ppauntatchingeabloshostunt="+crad1 <shoste-sc<3e"063inscsi_sop_dere3ann"/ntatchingeablorcunt="+crad1 <rce-sc3e"063, < 3"93CID_PR"3a>063>, <ppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *0636o =2gef="+code=ata_30c4ev_asiz30code=atu8cl637a-s/35id6aa9aa 3i93lass="s3IRYoVo=6aa9>063to =2eti>/28/28triece-scef=53e"063DEN>/28>fl3g063eak020" c>20"struccountatchingeablosc"dID_kflen="+cne" n"2sc"dID_kR/nmd*ar * *<6D_kflen="+cne" n"2ID_kR/nm3e"0642ak020" c>20"struccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * */28t">3* sp3n> 9"t"> * 9 064inscs"/ntatchingeablorepea"unt="+crad1 <repea"e-sc1620" c>20"/a> 9k> 933trbufa>,064s="sr3e" 6pa9ea03 94ne" nam3="L168 6pa9>064fl3g<0" _qc_suntatchingeablosc"dfor_eachdID_kflen="+cne" n"2sc"dfor_eachdID_k">ppauntatchingeablo6D_kflen="+cne" n"2ID_kR/nm, * * * *0644 C24KIN3:<<<<<<<<ppauntatchingeabloid167aetich simu ma, * * 3<94CID_PR"3class=d6tu9>064eak020" c>20" a> bufa0" c>20"struccountatchingeablod=">/a hr="+c167aetich simd=">/a hr=" C2*ar * *20"_6pa9>064:/28channele-scef=0, * */28i sc_ef=0a href="drivers3012ev_asiz30 064 C href="drivers3012ev_asiz30 064DEN>/28>fl3g064eak020" c>20" a> bufaaaaaaaaaaaaaaaaacontinuea href="drivers3012ev_asiz30 0652ak02e"ppauntatchingeablo6D_kflen="+cne" n"2ID_kR/nm20"/a> 9keref">atr9ufa>, [32]065aaaaa3i.c6pa9ea03i95"L1649"3PC-3 cc6pa9>065inscsi_sop_dev_astef" /r * */28i sc_ef=f="+code=rcdbscid167aetich simu ma hra href="+code=r no67aetich simu no ma3e"065 R/nmdn2 oputtef">ppaaaaaaaaaelsee"/28channele-scef=untatchingeablo6D_kflen="+cne" n"2ID_kR/nm hra href="+code=r zmp167aetich simu zmp ma3e"065>, <065:/add_a hr="+c167aetich sim_ds=">/add_a hr="">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r s=">/hostunt="+crad1 <s=">/hoste-sc, /r * */28channele-sc, * */28i sc_, 0,a href="drivers/9t4/libae1 [3e"065to =2eti>/28065DEN>/28>fl3gppauntatchingeablosid167aetich simu s ma<065eak020" c>20" a> bufaaaaaaaaaaaaaaaaaf="+code=rcdbscid167aetich simu ma hra href="+code=r sid167aetich simu s maef=href="+code=r sid167aetich simu s ma3e"0662ak020" c>20" a> bufat6issue aaaaaaaaf="+code=rcdbscd=">/a hr="_putunt="+crad1 <s=">/a hr="_put">ppauntatchingeablosid167aetich simu s ma<3e"ppauntatchingeabloid167aetich simu ma<3e"066inscsi_sop_dev_astef" }aelsepgef="+code=ata_30c4ev_asiz30code=atu8cl66s="sr3e" 6r19spa3l963ID_PR"3classc 6r19>066 R/nmdn2 oputtef">ppaaaaaaaaaaaaaaaaaf="+code=rcdbscid167aetich simu ma hra href="+code=r sid167aetich simu s maef=href="+code=r NULL67aetich simu NULLe-sc3e"066eak020" c>20" a> bufa}e"066:066 C href="drivers3012ev_asiz30 066DEN>/28>fl3getuyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]066drivers/a6 *9 si3n969ID_PR"3classca6 *9>066si.>/26">a3rb* copied backci28>fl3g20"/a> 9keref">atr9ufa>, [32]067id="L37206 *9 si3 970FW_REV3lass=c06 *9>067ci.>/26">a3rb* copied backci28>fl3g<* whegth: all a hr="s are attachedbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<67ta-s/3.c#6 *9 si3 97 lis /of inquc#6 *9>067e(hos26a h3e * co2 b s28>fl3g<*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]067aaaaa3i.c6"+9ode=i97"L1649"3PC-3 cc6"+9>067inscsi_sop_deuntatchingeablosc"dfor_eachdID_kflen="+cne" n"2sc"dfor_eachdID_k">ppauntatchingeablo6D_kflen="+cne" n"2ID_kR/nm, * * * *067 R/nmdn2 oputtef">ppa/ntatchingeablosc"dfor_eachdid167aetich simu sc"dfor_eachdid1">ppauntatchingeabloid167aetich simu ma, * *067eak020" c>20" a> bufa0" c>20"""""""""gotoountatchingeabloexit_loop167aetich simu exit_loope-sc3e"067to =2eti>/28<}e"20"/a> 9k> 933trbufa>,067drivers/a6"+9ode=A97ref="+c3ed ATSa6"+9>067eak020" c>20"ihreistaskfilsgef=""6D_kflen="+cne" n"2ID_kR/nm<620" c>20"/a> 9k> 933trbufa>,068id="L37206r19spa3i98=atrs20" c>20"06r19>0682ak020" c>20" a> bufare3ann3e"068"+c>/28t">3* sp3n> 9"t"> * 9 0682EN>/28>fl3g20"/a> 9keref">atr9ufa>, [32]068s="sr3e" 6"+9ode="98ne" nam3="L168 6"+9>0683ak020" c>20"ihreuntatchingeablosyncunt="+crad1 <dynce-sc20"/a> 9keref">atr9ufa>, [32]068bata-9cod6r19spa3"98CID_PR"3a>068hdca>tttttttt26a h3e * If4th""""""""""""""""* any progress, sleep briefly20"/a> 30_2ev_asiz30_fa>, [32]<68ta-s/35id6"L972036986lis /of inquo_6"L9>068 C26a h3e */liba clas"+co28>fl3g20"/a> 9keref">atr9ufa>, [32]068id="L3s2=6"+9ode="98lass="s3ring">=6"+9>068to =2eti>/28068DEN>/28>fl3gppa100<3e"068eak020" c>20" a> bufa /ntatchingeablo67at_failed_id167aetich simu 67at_failed_id1e-scef=""drivers/atfa_id167aetich simu ma3e"20" a> bufaaaaaaaaagotoountatchingeablorepea"unt="+crad1 <repea"e-sc3e"069inscse"ppa_ sanity checkcfor pio muWe might be failingpto detect boot"a hr=", g0_3 ityt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]069s="sr3e F6"+9ode="99ame="20" c>20"F6"+9>069e="Lttttttttt26a h3e *"line"""""""""q_scs_se* a few more chan="sbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<69bata-9cod6"+9ode="995lis /of inqu;d6"+9>069hdca>tttttttt26a h3e * If4th""""""""""""""""*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]069ta-s/35id6"L97203 99ch si20" c>20"_6"L9>069:/28triece-sc069to =2eti>/28ppa100<3e"069DEN>/28>fl3g069eak020" c>20" a> bufa}e"30_dss="li3class="7ine" 702ak02e" * *ppauntatchingeabloap167aetich simu apR/nm,a href="drivers/9t4/libae1 [3e"th:"51WARNING: synchronous SCSI"scan failed without makingpany progress, switchingpco async\nth:"51yt#s 41<3e"20"F7> buf70, < *70eak020" c>20"untatchingeabloqueue_idlayed_workflen="+cne" n"2queue_idlayed_work">ppauntatchingeablosystem_long_wqunt="+crad1 <dystem_long_wqR/nm,<&/r * *20"_7nscsi70: * *ppauntatchingeabloHZunt="+crad1 <HZ ma<<3e"/25a h3ef="+35>30_9ev_asiz30_9thd /span7a9aaaa3dca7 m9; *70si.>/26">a3rb* copied backc/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]074id="L37207 30csi>30csL1649"3PC-3 "l7nnscs71ci.>/26">a3rb* copied backci*dev_asac"dd=">_offL164_id1 - offL164 attached20"/a> 9keref">atr9ufa>, [32]0741rivers/a7130ver>30ct">/* FoM_S-3 (7o rs/71e(hos26a h3e * co2 b s*dev_as@a h: ATA"a hr="pco offL164 attached20"/a> 9keref">atr9ufa>, [32]0742rivers/a7L30 <>30c" c>220" c>20" 7> buf71comms26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0743rivers/a7a30cod>30c3L1649"3PC-3 "l7nscsi71 R/nm26a h3e * co2 b s*dev_asThispfunc>etupispcallhd fromsac"deh_hotplug()20"/a> 9keref">atr9ufa>, [32]0744rivers/a7p30cod>30c="strin3lass="l7ne" n71e="Lttttttttt26a h3e *"line"*dev_asfor=takingpthe20"/a> 9keref">atr9ufa>, [32]0745aaaa3dca7=30riv2T250_5ev_asiMD_REA7a> bu71hdca>tttttttt26a h3e * If4th*dev_asfunc>etupispcallhd with host lock which protects dev hra s #s 41620" c>20"/a> 9keref">atr9ufa>, [32]0746aaaa3dca7ID_PR"3classoent"> * 2 7C24KI71 C26a h3e */liba clas"+co*dev_asagainst clearingbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<747aaaa3dca7L1920"31917">16893/a>20"/a> 9keref">atr9ufa>, [32]0748aaaa3dca7"c9mme3 91TIFYota3/26a h3e */liba clas"+co*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0749aaaa3dca7"c9mme31910" c>20"/a>/26">a3rb* copied backci*dev_asspin_lock_irqsave(host lock)yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162072id="L37207>29"/a3<92an class="comm07>29>072ci.>/26">a3rb* copied backci*yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620721rivers/a716901 3"92t">/* FoM_S-3 #7169>072e(hos26a h3e * co2 b s*dev_asRETURNS:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]072aaaaa3i.c7L1920"3692" c>220" c>20"c7L19>072comms26a h3e */liba clas"+co*dev_as1 hrattached20"/a> 30_2ev_asiz30_fa>, [32]<72aaaaa3dca7am9="L3 92ne" nam3="L168 7am9>072 R/nm26a h3e * co2 b s*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]072e"0724 Ciscountatchingeablosc"dd=">/offL164_id167aetich simu sc"dd=">/offL164_id1">ppastruccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * *20"/a> 9k> 933trbufa>,0725" 3<92CID_PR"3class=d7tu9>072re+cmgef="+code=ata_30c4ev_asiz30code=atu8cl726aaaa3dca7ec9oto3l92_FW_REV3lass="_7ec9>072:072to =2eti>/28/a hr="_set_statbunt="+crad1 <d=">/a hr="_set_statb">ppauntatchingeabloid167aetich simu ma hra href="+code=r sid167aetich simu s ma, * *072DEN>/28>fl3g072eak020" c>20"a href="drivers/9ke" n3me="9ufa>, [32]073id="L37207"L97203 939">16893/a>0732ak020" c>20"re3ann"0a href="drivers3012ev_asiz30 073//lvaa href="drivers/9ke" n3me="9ufa>, [32]073aaaaa3i.c7 *9 si3e93"L1649"3PC-3 ac7 *9>073inscse"20"/a> 9keref">atr9ufa>, [32]073e"073e="Lttttttttt26a h3e *"line"*dev_assc"dd=">/remove/id1 - remove attached20"/a> 9keref">atr9ufa>, [32]0735" 3"93CID_PR"3a>073hdca>tttttttt26a h3e * If4th*dev_as@a h: ATA"a hr="pco remove attached20"/a> 9keref">atr9ufa>, [32]0736"073 C26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0737a-s/35id7aa9aa 3i93lass="s3IRYoVo=7aa9>073to =226a h3e */liba clas"+co*dev_asThispfunc>etupispcallhd fromsac"deh_s=">/hotplug()20"/a> 9keref">atr9ufa>, [32]0738aaaa3dca7"+9ode=a93TIFYota3073DEN>/26a h3e */liba clas"+co*dev_asresponsibl"sfor=removingpthe20"/a> 30_2ev_asiz30_fa>, [32]<739aaaa3dca7"+9ode=a939ID_PR"3classca7"+9>073si.>/26">a3rb* copied backci*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<74id="L37207"c9mme3D940FW_REV3lass=c07"c9>074ci.>/26">a3rb* copied backci*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]074ta-s/3.c#716901 3e94 lis /of inquc#7169>074e(hos26a h3e * co2 b s*dev_asKernel threadacontext (may sleep)byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<74aaaaa3i.c7r19spa3194"L1649"3PC-3 rc7r19>074comms26a h3e */liba clas"+co*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]074s="sr3e" 7pa9ea03 94ne" nam3="L168 7pa9>074fl3gppastruccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * *20"/a> 9k> 933trbufa>,074s="sr3e F7:h9r m3e94="strin3lass="F7:h9>0744 Cgef="+code=ata_30c4ev_asiz30code=atu8cl745" 3<94CID_PR"3class=d7tu9>074eak020" c>20"struccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *20"_7pa9>074:/a hr="+c167aetich simd=">/a hr=" C2*ar * *074to =2eti>/28/28flagc ma3e"30_9ev_asiz30_9thd /span749aaaa3dca7aa9aa 3d949ID_PR"3classca7aa9>074eak020" c>20"_ sanity checkcfor pio muAy c, we need20"/a> 9keref">atr9ufa>, [32]075id="L37207pa9ea03o950FW_REV3lass=c07pa9>075ci.>/26">a3rb* copied backci28>fl3g<* statb doesn't change20"/a> 9keref">atr9ufa>, [32]075ta-s/3.c#7pa9ea03o95 lis /of inquo#7pa9>075e(hos26a h3e * co2 b s28>fl3g<* d=">/a hr="_get()20"/a> 9keref">atr9ufa>, [32]075aaaaa3i.c7pa9ea03i95"L1649"3PC-3 cc7pa9>075comms26a h3e */liba clas"+co28>fl3g<* be removedoihrgth:episp_ds=">/a hr="_get()20"/a> 9keref">atr9ufa>, [32]075s="sr3e" 7 *9 si3e953ID_PR"3classc 7 *9>075 R/nm26a h3e * co2 b s28>fl3g<* incremo2 s refh:en=" cou2 s regardless"of"a hr=" statbbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<75s="sr3e F7 *9 si3e95="strin3lass=cF7 *9>075e="Lttttttttt26a h3e *"line"""""""""*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0755"075eak020" c>20"untatchingeablomutex_lock67aetich simu mutex_lock">ppa&/r * */hostunt="+crad1 <s=">/hoste-sc hra href="+code=r s=an_mutexunt="+crad1 <s=an_mutex ma<3e"075:ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"075 C href="drivers3012ev_asiz30 ppauntatchingeabloid167aetich simu ma<3e"075eak02e"0762ak020" c>20"_ sanity checkcfor pio muclearing dev hra s pispprotected by host lock *byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]076ta-s/3.c#7r19spa3l96 lis /of inquc#7r19>076//lvanocsi_soar * *076inscsi_sop_deuntatchingeabloid167aetich simu ma hra href="+code=r sid167aetich simu s maef=href="+code=r NULL67aetich simu NULLe-sc3e"076lin>/26KIN3:076eak020" c>20" a> bufa/ sanity checkcfor pio muIf user initiated unplug ra="s with us, s pcan goyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]076ta-s/35id7na9e="3i96_FW_REV3lass=c_7na9>076 C26a h3e */liba clas"+co28>fl3g20"/a> 9keref">atr9ufa>, [32]076id="L3s2=7 *9 si3n967FW_REV3lass=c=7 *9>076to =226a h3e */liba clas"+co28>fl3g20"/a> 30_2ev_asiz30_fa>, [32]<768a-s/35id7 *9 si3n96TIFYota3076DEN>/26a h3e */liba clas"+co28>fl3g20"/a> 9keref">atr9ufa>, [32]0769aaaa3dca7 *9 si3n969ID_PR"3classca7 *9>076eak020" c>20" a> bufaihreuntatchingeablos=">/a hr="_getunt="+crad1 <d=">/a hr="_get">ppauntatchingeablosid167aetich simu s ma0772ak020" c>20" a> bufaaaaaaaaa/ sanity checkcfor pio muThe following ensurespthe20"/a> 9keref">atr9ufa>, [32]077ta-s/3.c#7 *9 si3 97 lis /of inquc#7 *9>077e(hos26a h3e * co2 b s28>fl3g<28>fl3g20"/a> 301dev_asiz30csi.c#L162077aaaaa3i.c7"+9ode=i97"L1649"3PC-3 cc7"+9>077comms26a h3e */liba clas"+co28>fl3g20"/a> 301dev_asiz30csi.c#L162077s="sr3e" 7 19 st3e973ID_PR"3classc 7 19>077 R/nm26a h3e * co2 b s28>fl3getubyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<77s="sr3e F7aa9aa 3a97="strin3lass=cF7aa9>077e="Lttttttttt26a h3e *"line"""""""""q_scs_seq_scs_se*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]077bata-9cod7"+9ode=A97CID_PR"3classcd7"+9>077eak020" c>20" a> bufa0" c>20"f="+code=rcdbscd=">/a hr="_set_statbunt="+crad1 <d=">/a hr="_set_statb">ppauntatchingeablosid167aetich simu s ma, * *077to =2eti>/28ppa1<3e"077eak020" c>20" a> bufa}e"20"07r19>0782ak020" c>20"}e"078"+c>/28t">3* sp3n> 9"t"> * 9 078inscsi_sop_deuntatchingeablospin_unlock_irqrestoreunt="+crad1 <spin_unlock_irqrestore">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"078fl3g<0" _qc_suntatchingeablomutex_unlock67aetich simu mutex_unlock">ppa&/r * */hostunt="+crad1 <s=">/hoste-sc hra href="+code=r s=an_mutexunt="+crad1 <s=an_mutex ma<3e", 78bata-9cod7r19spa3"98CID_PR"3a>078eak020" c>20"ihreuntatchingeablosid167aetich simu s ma078: * *ppauntatchingeabloid167aetich simu ma,s/ttttttt26a hstring">th:"51detaching (SCSI"%s)\nth:"51yt#s 41,a href="drivers/9t4/libae1 [3e"=7"+9>078to =2eti>/28 * *ppa&/r * *078 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span78drivers/a7r19spa3D98ref="+c3abl//(a7r19>078eak020" c>20" a> bufahref="+code=r s=">/remove/id1r="+c167aetich simd=">/remove/id1r="">ppauntatchingeablosid167aetich simu s ma<3e"20" a> bufaf="+code=rcdbscd=">/a hr="_putunt="+crad1 <s=">/a hr="_put">ppauntatchingeablosid167aetich simu s ma<3e"079inscsa href="drivers/9ke" n3me="9ufa>, [32]079s="sr3e" 7 *9 si3<99ne" nam3="L168 7 *9>079lin>/26KIN3:20"F7"+9>079e="Ltstatic voilt_assscs_sear_handledID_k_detach67aetich simu sc"dd=">/handledID_k_detach">ppastruccountatchingeablosc"d6D_kflen="+cne" n"2sc"d6D_k C2*ar * *<6D_kflen="+cne" n"2ID_kR/nm<620" c>20"/a> 9k> 933trbufa>,079bata-9cod7"+9ode="995lis /of inqu;d7"+9>079re+cmgef="+code=ata_30c4ev_asiz30code=atu8cl79ta-s/35id7"L97203 99ch si20" c>20"_7"L9>079: * *079to =2eti>/28079 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span79drivers/a7am9;20"untatchingeablosc"dfor_eachdid167aetich simu sc"dfor_eachdid1">ppauntatchingeabloid167aetich simu ma, * *30_dss="li3class="8ine" 802ak020" c>20" a> bufaunsigned longountatchingeabloflagc"+crad=2eti>/28flagc ma3e"/28t">3* sp3n> 9"t"> * 9 /28flagc ma<& * *3* sp3n> 9"t"> * 9 ppaaaaaaaaacontinuea href="drivers3012ev_asiz30 20"F8> buf80, < *80eak020" c>20" a> bufa/ref="+code=r spin_lock_irqsaveunt="+crad1 <spin_lock_irqsave">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"20"_8nscsi80:/28flagc ma<&= ~/r * *ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"/25a h3ef="+35>30_9ev_asiz30_9thd /span8a9aaaa3dca8 m9; *80eak020" c>20" a> bufahref="+code=r ac"dd=">_remove/id167aetich simu sc"dd=">/remove/id1">ppauntatchingeabloid167aetich simu ma<3e"30csL1649"3PC-3 "l8nnscs812ak020" c>20"}e"/* FoM_S-3 (8o rs/81//lvaa href="drivers/9ke" n3me="9ufa>, [32]0842rivers/a8L30 <>30c" c>220" c>20" 8> buf81inscse"20"/a> 9keref">atr9ufa>, [32]0844rivers/a8p30cod>30c="strin3lass="l8ne" n81e="Lttttttttt26a h3e *"line"*dev_assc"dd=">/media_change_notify - send media change20"/a> 9keref">atr9ufa>, [32]0845aaaa3dca8=30riv2T250_5ev_asiMD_REA8a> bu81hdca>tttttttt26a h3e * If4th*dev_as@a h: Pointer20"/a> 9keref">atr9ufa>, [32]0846aaaa3dca8ID_PR"3classoent"> * 2 8C24KI81 C26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0847aaaa3dca8L1920"31917">16893/a>etuyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0848aaaa3dca8"c9mme3 91TIFYota3/26a h3e */liba clas"+co*dev_asev"libyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<849aaaa3dca8"c9mme31910" c>20"/a>/26">a3rb* copied backci*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<82id="L37208>29"/a3<92an class="comm08>29>082ci.>/26">a3rb* copied backci*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0821rivers/a816901 3"92t">/* FoM_S-3 #8169>082e(hos26a h3e * co2 b s*dev_asspin_lock_irqsave(host lock)yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162082aaaaa3i.c8L1920"3692" c>220" c>20"c8L19>082comms26a h3e */liba clas"+co*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]082aaaaa3dca8am9="L3 92ne" nam3="L168 8am9>082 R/nmvoilt_assscs_sear_media_change_notify67aetich simu sc"dd=">/media_change_notify">ppastruccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * *20"/a> 9k> 933trbufa>,082e"0824 Cgef="+code=ata_30c4ev_asiz30code=atu8cl825" 3<92CID_PR"3class=d8tu9>082eak020" c>20"ihreuntatchingeabloid167aetich simu ma hra href="+code=r sid167aetich simu s ma082:ppauntatchingeabloid167aetich simu ma hra href="+code=r sid167aetich simu s ma, * *082to =2eti>/28 * *082DEN>/a href="drivers/9ke" n3me="9ufa>, [32]0829aaaa3dca8"c9mme3a92ref="+c3ed ATSa8"c9>082eak02e"16893/a>083ci.>/26">a3rb* copied backc/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]083ta-s/3.c#8L192033i93ode=scr3/aion/#8L19>083e(hos26a h3e * co2 b s*dev_assc"dd=">/hotplug - SCSI"part"of"hotplugyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]083aaaaa3i.c8 *9 si3e93"L1649"3PC-3 ac8 *9>083comms26a h3e */liba clas"+co*dev_as@work: Pointer20"/a> 9keref">atr9ufa>, [32]083aaaaa3dca8am9="L3a93ne" nam3="L16a 8am9>083 R/nm26a h3e * co2 b i*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<83e"083e="Lttttttttt26a h3e *"line"*dev_asPerform SCSI"part"of"hotplug. It's executhd fromsa separatb">#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<835" 3"93CID_PR"3a>083hdca>tttttttt26a h3e * If4th*dev_asworkqueue#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<836aaaa3dca8ec9oto3d93_FW_REV3lass=9_8ec9>083 C26a h3e */liba clas"+co*dev_ashot plugging requirespworking EH me="hot unplugging isyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0837a-s/35id8aa9aa 3i93lass="s3IRYoVo=8aa9>083to =226a h3e */liba clas"+co*dev_assynchronizhd with hot plugging with a mutexbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<838aaaa3dca8"+9ode=a93TIFYota3083DEN>/26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<839aaaa3dca8"+9ode=a939ID_PR"3classca8"+9>083si.>/26">a3rb* copied backci*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]084id="L37208"c9mme3D940FW_REV3lass=c08"c9>084ci.>/26">a3rb* copied backci*dev_asKernel threadacontext (may sleep)byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<84ta-s/3.c#816901 3e94 lis /of inquc#8169>084e(hos26a h3e * co2 b s*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]084aaaaa3i.c8r19spa3194"L1649"3PC-3 rc8r19>084commsvoilt_assscs_sear_hotplug67aetich simu sc"dd=">/hotplugytppastruccountatchingeablowork_strucc67aetich simu work_struccR/nmd*ar * *pp0844 C24KIN3: * * 3<94CID_PR"3class=d8tu9>084eak020" c>20" a> bufa/ref="+code=r contaD_Pr_of167aetich simu contaD_Pr_of">ppauntatchingeabloworkflen="+cne" n"2work">pp, * * * *pp<3e"20"_8pa9>084:084 C href="drivers3012ev_asiz30 084DEN>/28>fl3g/28pflagc ma<& * *084eak020" c>20" a> bufahref="+code=r DPRINTK167aetich simu DPRINTK">ppauttttttt26a hstring">th:"51ENTER/EXIT - unloading\nth:"51yt#s 41<3e"0852ak020" c>20" a> bufare3ann3e"085inscse"085fl3g<0" _qc_suntatchingeabloDPRINTK167aetich simu DPRINTK">ppauttttttt26a hstring">th:"51ENTER\nth:"51yt#s 41<3e"ppa&/r * */s=an_mutexunt="+crad1 <s=">/s=an_mutex">pp<3e"085eak02e"085:20"/a> 9keref">atr9ufa>, [32]085id="L3s2=8"+9ode=i957FW_REV3lass=c=8"+9>085to =226a h3e */liba clas"+co28>fl3g<* because PMP ID_ks have to be scanned ev"l20"/a> 9keref">atr9ufa>, [32]0858a-s/35id8am9="L3 95TIFYota3085DEN>/26a h3e */liba clas"+co28>fl3g<* currently20"/a> 30_2ev_asiz30_fa>, [32]<859aaaa3dca8"+9ode=<959ID_PR"3classca8"+9>085si.>/26">a3rb* copied backci28>fl3g20"/a> 9keref">atr9ufa>, [32]086id="L37208aa9aa 3"960FW_REV3lass=c08aa9>0862ak020" c>20"_assscs_sear_handledID_k_detach67aetich simu sc"dd=">/handledID_k_detach">ppa&/r * *pp086inscsi_sop_dev_astef"for=euntatchingeabloiflen="+cne" n"2i ma = 0; * * * * * *086 R/nmdn2 oputtef">ppaaaaaaaaa_assscs_sear_handledID_k_detach67aetich simu sc"dd=">/handledID_k_detach">ppa&/r * *pp[/r * *, 865"086eak020" c>20"h sanity checkcfor pio muscan for=new on"s *byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]086ta-s/35id8na9e="3i96_FW_REV3lass=c_8na9>086:/s=an_hostunt="+crad1 <sc"dd=">/s=an_host">ppauntatchingeabloap167aetich simu apR/nm, 0<3e"086 C href="drivers3012ev_asiz30 086DEN>/28>fl3gppa&/r * */s=an_mutexunt="+crad1 <s=">/s=an_mutex">pp<3e"086eak020" c>20"untatchingeabloDPRINTK167aetich simu DPRINTK">ppauttttttt26a hstring">th:"51EXIT\nth:"51yt#s 41<3e"0872ak02a href="drivers/9ke" n3me="9ufa>, [32]087ta-s/3.c#8 *9 si3 97 lis /of inquc#8 *9>087"+c>/28t">3* sp3n> 9"t"> * 9 087comms26a h3e */liba clas"+c/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]087s="sr3e" 8 19 st3e973ID_PR"3classc 8 19>087 R/nm26a h3e * co2 b s*dev_assc"dd=">/user/s=an - indica>etu for=user-initiated bus scanyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]087s="sr3e F8aa9aa 3a97="strin3lass=cF8aa9>087e="Lttttttttt26a h3e *"line"*dev_as@shost: SCSI"hos(20"/a> 9keref">atr9ufa>, [32]0875"087hdca>tttttttt26a h3e * If4th*dev_as@channel: Channel20"/a> 9keref">atr9ufa>, [32]087ta-s/35id8r19spa3C97_FW_REV3lass=c_8r19>087 C26a h3e */liba clas"+co*dev_as@id: ID20"/a> 9keref">atr9ufa>, [32]087id="L3s2=8r19spa3C977FW_REV3lass=c=8r19>087to =226a h3e */liba clas"+co*dev_as@lun: LUN20"/a> 9keref">atr9ufa>, [32]0878a-s/35id8r19spa3397TIFYota3087DEN>/26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<87drivers/a8"+9ode=A97ref="+c3ed ATSa8"+9>087si.>/26">a3rb* copied backci*dev_asThispfunc>etupispcallhd wh"l20"/a> 30_2ev_asiz30_fa>, [32]<88id="L37208r19spa3i98=atrs20" c>20"08r19>088ci.>/26">a3rb* copied backci*dev_asscanb Setpprobe pending flag me="invoke EHbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<88ta-s/3.c#8r19spa3"98 lis /of inquo#8r19>088e(hos26a h3e * co2 b s*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<88aaaaa3i.c8r19spa3"98"L1649"3PC-3 dc8r19>088comms26a h3e */liba clas"+co*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]088s="sr3e" 8"+9ode="98ne" nam3="L168 8"+9>088 R/nm26a h3e * co2 b s*dev_asSCSI"layer<(wb don't care)yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162088s="sr3e F8r19spa3i98="strin3lass=oF8r19>088e="Lttttttttt26a h3e *"line"*yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620885"088hdca>tttttttt26a h3e * If4th*dev_asRETURNS:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]088ta-s/35id8"L972036986lis /of inquo_8"L9>088 C26a h3e */liba clas"+co*dev_asZerobyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<88id="L3s2=8"+9ode="98lass="s3ring">=8"+9>088to =226a h3e */liba clas"+co*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0888a-s/35id8r19spa3D98ass="li3class==8r19>088 cl>/iscountatchingeablosc"dd=">/user/s=anunt="+crad1 <sc"dd=">/user/s=anytppastruccountatchingeabloS=">/Hostunt="+crad1 <S=">/HostR/nmd*ar * *pp,aunsigned iscountatchingeablochannel167aetich simu channel ma,ef="+code=ata_30c4ev_asiz30code=atu8cl88drivers/a8r19spa3D98ref="+c3abl//(a8r19>088eak020" c>20" a> bufaaaaaaaaunsigned iscountatchingeabloidunt="+crad1 <id">pp,aunsigned iscountatchingeablolunflen="+cne" n"2Iun">pp089//lvanocsi_sostruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *ppauntatchingeabloshostunt="+crad1 <shost">pp<3e"089inscsi_sop_deunsigned longountatchingeabloflagc"+crad=2eti>/28flagc ma3e"20"F8"+9>089, <089eak020" c>20"ihre!/r * */28opcR/nm hra href="+code=r error/handler"+crad=2eti>/28error/handler">pp20"_8"L9>089:/28EOPNOTSUPP ma3e"089 C href="drivers3012ev_asiz30 089DEN>/28>fl3gpp !f=""drivers/atfa_SCAN_WILD_CARD167aetich simu SCAN_WILD_CARD ma<&& * *pp20" a> bufare3ann"-href="+code=r EINVAL67aetich simu EINVAL ma3e"30_dss="li3class="9ine" 902ak02e" * *ppauntatchingeabloap167aetich simu apR/nm) * *ppaaaaaaaaare3ann"-href="+code=r EINVAL67aetich simu EINVAL ma3e"20"F9> buf904R/nmdn2 oputtef">ppauntatchingeablodevno67aetich simu devnoR/nmef=""drivers/atfa_idunt="+crad1 <id">pp3e" *90eak020" c>20"}aelsepgef="+code=ata_30c4ev_asiz30code=atu8cl9"6aaaa3dca9 L97203 99ch si20" c>20"_9nscsi90:pp !f=""drivers/atfa_SCAN_WILD_CARD167aetich simu SCAN_WILD_CARD ma<&& * *pp/28>fl3g *90eak020" c>20"a href="drivers/9ke" n3me="9ufa>, [32]094id="L37209 30csi>30csL1649"3PC-3 "l9nnscs912ak02e"/* FoM_S-3 (9o rs/91//lvanocsi_soar * *ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"220" c>20" 9> buf91inscse"ppastruccountatchingeablosc"d6D_kflen="+cne" n"2sc"d6D_k C2*ar * *<6D_kflen="+cne" n"2ID_kR/nm3e" * 2 9C24KI91: * *ppauntatchingeablo6D_kflen="+cne" n"2ID_kR/nm, * *16893/a>/28 * * * *<6D_kflen="+cne" n"2ID_kR/nm hra href="+code=r eh_info67aetich simu eh_info C3e"/28>fl3g/2|f=""drivers/atfa_ATA_ALL_DEVICES167aetich simu ATA_ALL_DEVICES C3e"20"/a>20" a> bufaaaaaaaa /ntatchingeabloehiflen="+cne" n"2ehiR/nm hra href="+code=r ac>etu67aetich simu sc>etuyt>/2|f=""drivers/atfa_ATA_EH_RESET167aetich simu ATA_EH_RESET C3e"29"/a3<92an class="comm09>29>0922ak020" c>20" a> bufaa href="drivers/9ke" n3me="9ufa>, [32]0921rivers/a916901 3"92t">/* FoM_S-3 #9169>092//lvanocsi_soaaelsepgef="+code=ata_30c4ev_asiz30code=atu8cl92aaaaa3i.c9L1920"3692" c>220" c>20"c9L19>092inscsi_sop_dev_astef"struccountatchingeablosc"da hr="+c167aetich simsc"da hr="R/nmd*ar * *ppauntatchingeabloap167aetich simu apR/nm, untatchingeablodevno67aetich simu devnoR/nm<3e"0924R/nmdn2 oputtef">ppaihreuntatchingeabloid167aetich simu ma 3<92CID_PR"3class=d9tu9>092eak020" c>20" a> bufa0" c>20"struccountatchingeablosc"deh_info67aetich simu sc"deh_info C2*ar * * * *092:/2|f=1 << * *092to =2eti>/28092DEN>/28>fl3g092eak020" c>20" a> bufaaaaaaaa /ntatchingeablorc67aetich simu rc ma = -href="+code=r EINVAL67aetich simu EINVAL ma3e"16893/a>0932ak020" c>20"}e"/28t">3* sp3n> 9"t"> * 9 093inscsi_sop_deihreuntatchingeablorc67aetich simu rc ma =OT0)vgef="+code=ata_30c4ev_asiz30code=atu8cl93aaaaa3dca9am9="L3a93ne" nam3="L16a 9am9>093 R/nmdn2 oputtef">ppauntatchingeablosc"dzsc(_scheduledehunt="+crad1 <sc"dzsc(_scheduledeh">ppauntatchingeabloap167aetich simu apR/nm)3e"0934R/nmdn2 oputtef">ppauntatchingeablodpin_unlock_irqrestoreunt="+crad1 <spin_unlock_irqrestore">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e" 3"93CID_PR"3a>093eak020" c>20" a> bufa/ref="+code=r sc"dzsc(_waitdehunt="+crad1 <sc"dzsc(_waitdeh">ppauntatchingeabloap167aetich simu apR/nm)3e"093to =2eti>/28ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"093 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /span939aaaa3dca9"+9ode=a939ID_PR"3classca9"+9>093eak020" c>20"re3ann"untatchingeablorc67aetich simu rc ma3e"0942ak02a href="drivers/9ke" n3me="9ufa>, [32]094ta-s/3.c#916901 3e94 lis /of inquc#9169>094"+c>/28t">3* sp3n> 9"t"> * 9 094comms26a h3e */liba clas"+c/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]094s="sr3e" 9pa9ea03 94ne" nam3="L168 9pa9>094 R/nm26a h3e * co2 b s*dev_assc"dd=">/ _res=an - initiate d=">/res=anda hr="()yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L162094s="sr3e F9:h9r m3e94="strin3lass="F9:h9>094e="Lttttttttt26a h3e *"line"*dev_as@work: Pointer20"/a> 301dev_asiz30csi.c#L1620945" 3<94CID_PR"3class=d9tu9>094hdca>tttttttt26a h3e * If4th*yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L1620946aaaa3dca9pa9ea03 94ch si20" c>20"_9pa9>094 C26a h3e */liba clas"+co*dev_asAfterpATA"z*/l thru (SAT) 3e mands20"/a> 301dev_asiz30csi.c#L1620947a-s/35id9na9e="3194lass="s3IRYoVo=9na9>094to =226a h3e */liba clas"+co*dev_assiz30c nehd co propagate the20"/a> 30_2ev_asiz30_fa>, [32]<948aaaa3dca9r19spa3194TIFYota3094DEN>/26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<949aaaa3dca9aa9aa 3d949ID_PR"3classca9aa9>094si.>/26">a3rb* copied backci*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]095id="L37209pa9ea03o950FW_REV3lass=c09pa9>095ci.>/26">a3rb* copied backci*dev_asKernel threadacontext (may sleep)byt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<95ta-s/3.c#9pa9ea03o95 lis /of inquo#9pa9>095e(hos26a h3e * co2 b s*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]095aaaaa3i.c9pa9ea03i95"L1649"3PC-3 cc9pa9>095commsvoilt_assscs_sear_ _res=anunt="+crad1 <sc"dd=">_ _res=an">ppastruccountatchingeablowork_strucc67aetich simu work_struccR/nmd*ar * *pp095fl3g * *095eak020" c>20" a> bufa/ref="+code=r contaD_Pr_of167aetich simu contaD_Pr_of">ppauntatchingeabloworkflen="+cne" n"2work">pp, * */res=andtaskflen="+cne" n"2d=">/res=andtask ma<3e"095: * *<6D_kflen="+cne" n"2ID_kR/nm3e"095to =2eti>/28095DEN>/28>fl3g/28flagc ma3e"095eak02e"0962ak020" c>20"_assscs_searppa&/r * */s=an_mutexunt="+crad1 <s=">/s=an_mutex">pp<3e"ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"096inscse"096fl3g<0" _qc_suntatchingeablosc"dfor_eachd6D_kflen="+cne" n"2sc"dfor_eachd6D_k">ppauntatchingeablo6D_kflen="+cne" n"2ID_kR/nm, * *ppauntatchingeablosc"dfor_eachdid167aetich simu sc"dfor_eachdid1">ppauntatchingeabloid167aetich simu ma, * *096eak020" c>20" a> bufa0" c>20"struccountatchingeablod=">_ r="+c167aetich simd=">/a hr="R/nmd*ar * *096to =2eti>/28 * *096eak020" c>20" a> bufaaaaaaaa ihreuntatchingeablos=">/a hr="_getunt="+crad1 <s=">/a hr="_get">ppauntatchingeablosid167aetich simu s ma<0972ak020" c>20" a> bufa continuea href="drivers3012ev_asiz30 097"+c>/28t">3* sp3n> 9"t"> * 9 097inscsi_sop_dev_astef"""""""""f="+code=rcdbscdpin_unlock_irqrestoreunt="+crad1 <spin_unlock_irqrestore">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"097 R/nmdn2 oputtef">ppaaaaaaaaa_assscs_sear/res=anda hr="flen="+cne" n"2d=">/res=andid1r="">ppa&auntatchingeablosid167aetich simu s ma hra href="+code=r sid1_genid167aetich simu s _genid1 ma<<3e"ppaaaaaaaaa_assscs_sear/a hr="_putunt="+crad1 <s=">/a hr="_put">ppauntatchingeablosid167aetich simu s ma<3e"097eak020" c>20" a> bufa0" c>20"ar * *ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"097to =2eti>/2830_9ev_asiz30_9thd /span97drivers/a9"+9ode=A97ref="+c3ed ATSa9"+9>097eak020" c>20"untatchingeablodpin_unlock_irqrestoreunt="+crad1 <spin_unlock_irqrestore">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6ock67aetich simu lock">pp, * */28flagc ma<3e"20"09r19>0982ak020" c>20"_assscs_searppa&/r * */s=an_mutexunt="+crad1 <s=">/s=an_mutex">pp<3e"098//lvaa href="drivers/9ke" n3me="9ufa>, [32]098aaaaa3i.c9r19spa3"98"L1649"3PC-3 dc9r19>098inscse"098 R/nm26a h3e * co2 b /**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]098s="sr3e F9r19spa3i98="strin3lass=oF9r19>098e="Lttttttttt26a h3e *"line"* c>20"sc"ddasdzsc(_alloc - Allocate zsc(#s 41620" c>20"/a> 9keref">atr9ufa>, [32]0985"098hdca>tttttttt26a h3e * If4th*dev_as@host: ATA hos(20"/a> 30_2ev_asiz30_fa>, [32]<98ta-s/35id9"L972036986lis /of inquo_9"L9>098 C26a h3e */liba clas"+co*dev_as@zsc(_info: Informa>etu fromslow-level hos( 30yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<98id="L3s2=9"+9ode="98lass="s3ring">=9"+9>098to =226a h3e */liba clas"+co*dev_as@shost: SCSI"hos(, "a hr=" is attached toyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<988a-s/35id9r19spa3D98ass="li3class==9r19>098DEN>/26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<98drivers/a9r19spa3D98ref="+c3abl//(a9r19>098si.>/26">a3rb* copied backci*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]099id="L37209r19spa3199an class="comm09r19>099ci.>/26">a3rb* copied backci*dev_asPCI/etc. bus probe sembyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<99ta-s/3.c#9r19spa3 99 lis /of inqu;#9r19>099e(hos26a h3e * co2 b s*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]<99aaaaa3i.c9r19spa3199"L1649"3PC-3 "c9r19>099comms26a h3e */liba clas"+co*dev_asRETURNS:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]099s="sr3e" 9 *9 si3<99ne" nam3="L168 9 *9>099 R/nm26a h3e * co2 b s*dev_assc"dzsc(20"/a> 30_2ev_asiz30_fa>, [32]<99s="sr3e F9"+9ode="99ame="20" c>20"F9"+9>099e="Lttttttttt26a h3e *"line"*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]099bata-9cod9"+9ode="995lis /of inqu;d9"+9>099eak02e"20"_9"L9>099: * *ppastruccountatchingeablosc"dhostunt="+crad1 <sc"dhostR/nmd*ar * *pp,e"099to =2eti>/28 * *099DEN>/28>fl3g/Hostunt="+crad1 <S=">/HostR/nmd*ar * *pp40"d C24KIN3: * *f="+code=ata_30c4ev_asiz30code=atu8c40"1rivers/40"19spa3 99 lis /of inqu;40"19>40""+c>/28t">3* sp3n> 9"t"> * 9 40"inscsi_sop_dear * *ppaar * *pp<3e"40"3/lvanocsi_soihre!/r * *20"40"+9>40"4R/nmdn2 oputtef">ppare3ann"untatchingeabloNULL167aetich simu NULL ma3e"40"eak02e"20"40"L9>40":40"7ppef=&/r * *pp hra href="+code=r 6ock67aetich simu lock">pp;e"40"DEN>/28>fl3g40"eak020" c>20"untatchingeablosp167aetich simu apR/nm hra href="+code=r mwdma_maskflen="+cne" n"2mwdma_maskR/nmefountatchingeablozsc(_info67aetich simu zsc(_infoR/nm hra href="+code=r mwdma_maskflen="+cne" n"2mwdma_maskR/nm;e"40 3ak020" c>20"untatchingeablosp167aetich simu apR/nm hra href="+code=r udma_maskflen="+cne" n"2udma_maskR/nmefountatchingeablozsc(_info67aetich simu zsc(_infoR/nm hra href="+code=r udma_maskflen="+cne" n"2udma_maskR/nm;e"/* FoM_S-3 40130>40 //lvanocsi_soar * */28flagc ma2|f=""drivers/atfa_zsc(_info67aetich simu zsc(_infoR/nm hra href="+code=r flagc"+crad=2eti>/28flagc ma3e"220" c>20"40L30>40 inscsi_sop_dear * */28opcR/nmefountatchingeablozsc(_info67aetich simu zsc(_infoR/nm hra href="+code=r psc(_opc"+crad=2eti>/28psc(_opc ma3e"40 fl3g<0" _qc_suntatchingeablosp167aetich simu apR/nm hra href="+code=r cbl167aetich simu cblR/nmefountatchingeabloATA_CBL_SATA167aetich simu ATA_CBL_SATA ma3e",40 5rivers/40=30riv2T250_5ev_asiMD_RE40=30>40 eak020" c>20"re3ann"untatchingeabloap167aetich simu apR/nm3e"ref="drivers30_5ev_asiz30_3trbufa>,40 6rivers/40ID_PR"3classoent"> * 2 40ID_>40 6/lvaa href="drivers/9ke" n3me="9ufa>, [32]40 7rivers/40L1920"31917">16893/a>40 to =22r * *ppauntatchingeabloac"ddasdzsc(_allocunt="+crad1 <sc"ddasdzsc(_alloc">pp<3e"40 cl>/25a h3ef="+35>30_9ev_asiz30_9thd /spa40 9rivers/40"c9mme31910" c>20"/a>40 si.>/26">a3rb* copied backc/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]402drivers/40>29"/a3<92an class="comm40>29>40>2="Lttttttttt26a h3e *"line"* c>20"sc"ddasdzsc(_start - Setppsc(20"/a> 30_2ev_asiz30_fa>, [32]40>1rivers/4016901 3"92t">/* FoM_S-3 40169>40>e(hos26a h3e * co2 b s* c>20"@ap: Poc(#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40>2rivers/40L1920"3692" c>220" c>20"40L19>40>comms26a h3e */liba clas"+co*">#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40>3rivers/40am9="L3 92ne" nam3="L16840am9>40> R/nm26a h3e * co2 b s*dev_asCallhd just afterpdr9u20"/a> 9keref">atr9ufa>, [32]40>4rivers/40pa9ea03d92="strin3lass="40pa9>40>e="Lttttttttt26a h3e *"line"* c>20"initializ"dbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]40>5rivers/40tu9a> 3<92CID_PR"3class=40tu9>40>hdca>tttttttt26a h3e * If4th*yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L16240>6rivers/40ec9oto3l92_FW_REV3lass="40ec9>40> C26a h3e */liba clas"+co*dev_asMay be ushd as the20"/a> 30_2ev_asiz30_fa>, [32]40>7rivers/40aa9aa 3n92lass="s3IRYoVP40aa9>40>to =226a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]40>8rivers/40"c9mme3l92TIFYota340>DEN>/26a h3e */liba clas"+co*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40>9rivers/40"c9mme3a92ref="+c3ed ATS40"c9>40>si.>/26">a3rb* copied backci*dev_asInherithd fromscallhrbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]403drivers/40"L97203 939">16893/a>40"L="Lttttttttt26a h3e *"line"*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40"1rivers/40L192033i93ode=scr3/aion/40L19>40"e(hosiscountatchingeablosc"ddasdzsc(_startunt="+crad1 <sc"ddasdzsc(_start">ppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *40"2ak02gef="+code=ata_30c4ev_asiz30code=atu8c4033rivers/40am9="L3a93ne" nam3="L16a40am9>40"fl3g<0" _qc_su6">a3rb* copied backc/*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40"4rivers/40pa9ea03_93="strin3lass="40pa9>40"e="Lttttttttt26a h3e *"line"""""""""* the20"/a> 9keref">atr9ufa>, [32]40"5rivers/40tu9a> 3"93CID_PR"3a>40"hdca>tttttttt26a h3e * If4th""""""""* have new eh,rwb won't thaw ityt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40"6rivers/40ec9oto3d93_FW_REV3lass=940ec9>40" C26a h3e */liba clas"+co""""""""*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40"7rivers/40aa9aa 3i93lass="s3IRYoVo40aa9>40"7 * */28opcR/nm hra href="+code=r error/handler"+crad=2eti>/28error/handler">pp40"DEN>/28>fl3g/28pflagc ma2&= ~untatchingeabloATA_PFLAG_FROZEN167aetich simu ATA_PFLAG_FROZENR/nm3e"ref="drivers30_5ev_asiz30_3trbufa>,4039rivers/40"+9ode=a939ID_PR"3classc40"+9>40"eak020" c>20"re3ann"0;e"40"c/lvaa href="drivers/9ke" n3me="9ufa>, [32]4041rivers/4016901 3e94 lis /of inquc40169>40"1o =22r * *ppauntatchingeabloac"ddasdzsc(_startunt="+crad1 <sc"ddasdzsc(_start">pp<3e"40"inscse"20"/a> 9keref">atr9ufa>, [32]40"4rivers/40:h9r m3e94="strin3lass="40:h9>40"e="Lttttttttt26a h3e *"line"* c>20"sc"dzsc(_stop - Undo"sc"ddasdzsc(_start()yt#s 41620" c>20"/a> 301dev_asiz30csi.c#L16240"5rivers/40tu9a> 3<94CID_PR"3class=40tu9>40"hdca>tttttttt26a h3e * If4th*dev_as@ap: Poc(20"/a> 9keref">atr9ufa>, [32]40"6rivers/40pa9ea03 94ch si20" c>20"40pa9>40" C26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40"7rivers/40na9e="3194lass="s3IRYoVo40na9>40"to =226a h3e */liba clas"+co*dev_asMay be ushd as the20"/a> 30_2ev_asiz30_fa>, [32]4048rivers/40r19spa3194TIFYota340"DEN>/26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]40"9rivers/40aa9aa 3d949ID_PR"3classc40aa9>40"si.>/26">a3rb* copied backci*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]405drivers/40pa9ea03o950FW_REV3lass=c40pa9>40pai.>/26">a3rb* copied backci*dev_asInherithd fromscallhrbyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]4051rivers/40pa9ea03o95 lis /of inquo40pa9>40pe(hos26a h3e * co2 b s*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40p2rivers/40pa9ea03i95"L1649"3PC-3 c40pa9>40pinscse"40p R/nmvoilt_assscs_searppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *40p4ak02gef="+code=ata_30c4ev_asiz30code=atu8c4055rivers/40"+9ode=i95CID_PR"3classo40"+9>40p5/lvaa href="drivers/9ke" n3me="9ufa>, [32]4056rivers/40"+9ode=i95_FW_REV3lass=c40"+9>40p6o =22r * *ppauntatchingeabloac"ddasdzsc(_stop167aetich simu ac"ddasdzsc(_stop">pp<3e"40p C href="drivers3012ev_asiz30 20"/a> 9keref">atr9ufa>, [32]4059rivers/40"+9ode=<959ID_PR"3classc40"+9>40psi.>/26">a3rb* copied backci*dac"ddasdasync_probe - simply schedule probing me="re3annyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]406drivers/40aa9aa 3"960FW_REV3lass=c40aa9>40aai.>/26">a3rb* copied backci*d@ap: Poc(20"/a> 9keref">atr9ufa>, [32]4061rivers/40r19spa3l96 lis /of inquc40r19>40ae(hos26a h3e * co2 b s*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]40a2rivers/40r19spa3l96"L1649"3PC-3 c40r19>40acomms26a h3e */liba clas"+co*dFor z30ch scheduling of probe for=das attached r9u20"/a> 30_2ev_asiz30_fa>, [32]40a3rivers/40r19spa3l963ID_PR"3classc40r19>40a R/nm26a h3e * co2 b s*dthe20"/a> 301dev_asiz30csi.c#L1624064rivers/40pa9ea03"96="strin3lass=c40pa9>40ae="Lttttttttt26a h3e *"line"*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40a5rivers/40r19spa3l96CID_PR"3classc40r19>40a5R/nmvoilt_assscs_searppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *40a6ak02gef="+code=ata_30c4ev_asiz30code=atu8c4067rivers/40 *9 si3n967FW_REV3lass=c40 *9>40a7ppauntatchingeabloap167aetich simu apR/nm)3e"40a9o =22r * *ppauntatchingeabloac"ddasdasync_probe167aetich simu ac"ddasdasync_probe">pp)3e"40 e(hosiscountatchingeablosc"ddasdsync_probe167aetich simu ac"ddasdsync_probe">ppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *40 2ak02gef="+code=ata_30c4ev_asiz30code=atu8c4073rivers/40 19 st3e973ID_PR"3classc40 19>40 fl3g<0" _qc_sre3ann"untatchingeabloac"dzsc(_probe167aetich simu sc"dzsc(_probe">ppauntatchingeabloap167aetich simu apR/nm)3e"40 4/lvaa href="drivers/9ke" n3me="9ufa>, [32]4075rivers/40"+9ode=A97CID_PR"3classc40"+9>40 5o =22r * *ppauntatchingeabloac"ddasdsync_probe167aetich simu ac"ddasdsync_probe">pp)3e"40 DEN>/26a h3e */liba clas"+c/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4079rivers/40"+9ode=A97ref="+c3ed ATS40"+9>40 si.>/26">a3rb* copied backci*dev_assc"ddasdzsc(_init - Initializ"=a SATA id1r="">#s 41620" c>20"/a> 9keref">atr9ufa>, [32]408drivers/40r19spa3i98=atrs20" c>20"40r19>40r1dca>tttttttt26a h3e * If4th*dev_as@ap: SATA"zsc(#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4081rivers/40r19spa3"98 lis /of inquo40r19>40re(hos26a h3e * co2 b s*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]4082rivers/40r19spa3"98"L1649"3PC-3 d40r19>40rcomms26a h3e */liba clas"+co*dev_asLOCKING:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4083rivers/40"+9ode="98ne" nam3="L16840"+9>40r R/nm26a h3e * co2 b s*dev_asPCI/etc. bus probe sembyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]40r4rivers/40r19spa3i98="strin3lass=o40r19>40re="Lttttttttt26a h3e *"line"*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]40r5rivers/40r19spa3"98CID_PR"3a>40rhdca>tttttttt26a h3e * If4th*dev_asRETURNS:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]40r6rivers/40"L972036986lis /of inquo40"L9>40r C26a h3e */liba clas"+co*dev_asZero20"/a> 30_2ev_asiz30_fa>, [32]40r7rivers/40"+9ode="98lass="s3ring">40"+9>40rto =226a h3e */liba clas"+co*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4088rivers/40r19spa3D98ass="li3class=40r19>40r cl>/25a h3ef="+35>30_9ev_asiz30_9thd /spa4089rivers/40r19spa3D98ref="+c3abl//(40r19>40r9(hosiscountatchingeablosc"ddasdzsc(_init167aetich simu ac"ddasdzsc(_init">ppastruccountatchingeablosc"dzsc(unt="+crad1 <sc"dzsc(R/nmd*ar * *40r1ak02gef="+code=ata_30c4ev_asiz30code=atu8c4091rivers/40r19spa3 99 lis /of inqu;40r19>40r//lvanocsi_soiscountatchingeablorc67aetich simu rc ma = /r * */28opcR/nm hra href="+code=r zsc(_startunt="+crad1 <zsc(_start">ppauntatchingeabloap167aetich simu apR/nm)3e"40rinscse"20"40"+9>40r4R/nmdn2 oputtef">ppare3ann"untatchingeablorc67aetich simu rc ma3e"40reak020" c>20"untatchingeablosp167aetich simu apR/nm hra href="+code=r prisc_idunt="+crad1 <prisc_id ma = /r * *ppa&/r * *20"40"L9>40r:40r7/lvaa href="drivers/9ke" n3me="9ufa>, [32]4098rivers/40co9men3d99ass="li3class=40co9>40r8o =22r * *ppauntatchingeabloac"ddasdzsc(_init167aetich simu ac"ddasdzsc(_init">pp)3e"40reak02e"4101dca>tttttttt26a h3e * If4t/**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]41"1rivers/41"19spa3 99 lis /of inqu;41"19>410e(hos26a h3e * co2 b s* c>20"ac"ddasdzsc(_destroy - Destroy a SATA"zsc(20"/a> 9keref">atr9ufa>, [32]41"2rivers/41"19spa3199"L1649"3PC-3 "41"19>410comms26a h3e */liba clas"+co*dev_as@ap: SATA"zsc(20"/a> 9keref">atr9ufa>, [32]41"3rivers/41"*9 si3<99ne" nam3="L16841"*9>410 R/nm26a h3e * co2 b s*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]41"4rivers/41"+9ode="99ame="20" c>20"41"+9>410e="Lttttttttt26a h3e *"line"*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]41"5rivers/41"+9ode="995lis /of inqu;41"+9>41"eak02e"20"41"L9>41": * *41"741"DEN>/28>fl3g/28opcR/nm hra href="+code=r zsc(_stop167aetich simu zsc(_stop">pp410eak020" c>20" a> bufauntatchingeabloap167aetich simu apR/nm hra href="+code=r opc"+crad=2eti>/28opcR/nm hra href="+code=r zsc(_stop167aetich simu zsc(_stop">ppauntatchingeabloap167aetich simu apR/nm)3e"41 3ak020" c>20"untatchingeablokfree167aetich simu kfree">ppauntatchingeabloap167aetich simu apR/nm)3e"/* FoM_S-3 41130>411//lvaa href="drivers/9ke" n3me="9ufa>, [32]4112rivers/41L30 <>30c" c>220" c>20"41L30>41 inscs2r * *ppauntatchingeabloac"ddasdzsc(_destroy167aetich simu ac"ddasdzsc(_destroyytpp)3e"411lin>/26KIN3:20"/a> 9keref">atr9ufa>, [32]41 5rivers/41=30riv2T250_5ev_asiMD_RE41=30>411hdca>tttttttt26a h3e * If4th*dev_asac"ddasdslave_configure - Default slave_config rout5ev for=>atr9u20"/a> 9keref">atr9ufa>, [32]41 6rivers/41ID_PR"3classoent"> * 2 41ID_>411 C26a h3e */liba clas"+co*dev_as@s : SCSI"a hr=" co configureyt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]41 7rivers/41L1920"31917">16893/a>411to =226a h3e */liba clas"+co*dev_as@ap: ATA"zsc(20"/a> 9keref">atr9ufa>, [32]41 8rivers/41"c9mme3 91TIFYota3411DEN>/26a h3e */liba clas"+co*yt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]41 9rivers/41"c9mme31910" c>20"/a>41 si.>/26">a3rb* copied backch*dev_asRETURNS:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]412drivers/41>29"/a3<92an class="comm41>29>41>2="Lttttttttt26a h3e *"line"* c>20"Zerobyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]41>1rivers/4116901 3"92t">/* FoM_S-3 41169>41>e(hos26a h3e * co2 b s*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]41>2rivers/41L1920"3692" c>220" c>20"41L19>412inscse"/a hr="R/nmd*ar * * * *5rivers/41tu9a> 3<92CID_PR"3class=41tu9>412eak020" c>20"untatchingeablosc"dd=">_s _config167aetich simu ac"dd=">_s _config">ppauntatchingeablosid167aetich simu s ma<3e"412:_ _config167aetich simu ac"dd=">_ _config">ppauntatchingeablosid167aetich simu s ma, * *41278rivers/41"c9mme3l92TIFYota34128/lvaa href="drivers/9ke" n3me="9ufa>, [32]41>9rivers/41"c9mme3a92ref="+c3ed ATS41"c9>4129o =22r * *ppauntatchingeabloac"ddasdslave_configure167aetich simu ac"ddasdslave_configureytpp<3e"16893/a>413* C href="drivers3012ev_asiz30 413e(hos26a h3e * co2 b /**yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4132rivers/41 *9 si3e93"L1649"3PC-3 a41 *9>413comms26a h3e */liba clas"+co*dev_asac"ddasdqueuecmd - Issue SCSI"cdbatr9ufmanaged id1r="">#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4133rivers/41am9="L3a93ne" nam3="L16a41am9>413 R/nm26a h3e * co2 b s*dev_as@cmd: SCSI"3e mand20"/a> 9keref">atr9ufa>, [32]41"4rivers/41pa9ea03_93="strin3lass="41pa9>41"e="Lttttttttt26a h3e *"line"*dev_as@ap: ATA"zsc(20"/a> 9keref">atr9ufa>, [32]41"5rivers/41tu9a> 3"93CID_PR"3a>41"hdca>tttttttt26a h3e * If4th*yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]4136rivers/41ec9oto3d93_FW_REV3lass=941ec9>41" C26a h3e */liba clas"+co*dev_asRETURNS:yt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]41"7rivers/41aa9aa 3i93lass="s3IRYoVo41aa9>413to =226a h3e */liba clas"+co*dev_asRe3ann"value froms__sc"dd=">_queuecmd()20"/a> 301dev_asiz30csi.c#L1624138rivers/41"+9ode=a93TIFYota3413DEN>/26a h3e */liba clas"+co*dev_as0 otherwisebyt#s 41620" c>20"/a> 30_2ev_asiz30_fa>, [32]4139rivers/41"+9ode=a939ID_PR"3classc41"+9>413si.>/26">a3rb* copied backch*byt#s 41620" c>20"/a> 9keref">atr9ufa>, [32]414drivers/41"c9mme3D940FW_REV3lass=c41"c9>414* C href="drivers3012ev_asiz30 414e(hosiscountatchingeablosc"ddasdqueuecmd167aetich simu ac"ddasdqueuecmdytppastruccountatchingeablovers_cmnd167aetich simu vers_cmndR/nmd*ar * * * *4142ak02gef="+code=ata_30c4ev_asiz30code=atu8c41"3rivers/41pa9ea03 94ne" nam3="L16841pa9>4143/lvanocsi_soiscountatchingeablorc67aetich simu rc ma = 0;e"414, < 3<94CID_PR"3class=41tu9>414eak020" c>20"untatchingeablosc"dd=">_dump_cdb167aetich simu ac"dd=">_ ump_cdb">ppauntatchingeabloap167aetich simu apR/nm, * *20"41pa9>414:4147ppauntatchingeabloac"d _enabled167aetich simu ac"d _enabled">ppauntatchingeabloap167aetich simu apR/nm hra href="+code=r 6D_kflen="+cne" n"2ID_kR/nm.href="+code=r r="+c167aetich sima hr="R/nm<<414DEN>/28>fl3g * *<__sc"dd=">_queuecmd67aetich simu __sc"dd=">_queuecmd">ppauntatchingeablocmd167aetich simu cmdytpp,414eak020" c>20"elsevgef="+code=ata_30c4ev_asiz30code=atu8c415drivers/41pa9ea03o950FW_REV3lass=c41pa9>4152ak020" c>20" a> bufauntatchingeablocmd167aetich simu cmdytpp hra href="+code=r resul(unt="+crad1 <resul( ma = auntatchingeabloDID_BAD_TARGETunt="+crad1 <DID_BAD_TARGET ma << 16<3e"20" a> bufauntatchingeablocmd167aetich simu cmdytpp hra href="+code=r d=">_ o="+c167aetich simd=">/ao="">ppauntatchingeablocmd167aetich simu cmdytpp<3e"415inscsi_sop_dea href="drivers/9ke" n3me="9ufa>, [32]4153rivers/41 *9 si3e953ID_PR"3classc41 *9>415fl3g<0" _qc_sre3ann"untatchingeablorc67aetich simu rc ma3e"4154/lvaa href="drivers/9ke" n3me="9ufa>, [32]4155rivers/41"+9ode=i95CID_PR"3classo41"+9>4155o =22r * *ppauntatchingeabloac"ddasdqueuecmd167aetich simu ac"ddasdqueuecmdytpp<3e"41p6o =22/pre>
  • TheLXR ied unityytpp, Ixr.FW_ux.no kindly"hos(ed by""