Print this page
XXXX introduce drv_sectohz


6775                         sdinfo = sata_get_device_info(sata_hba_inst,
6776                             &sata_device);
6777                         if (sata_initialize_device(sata_hba_inst, sdinfo) !=
6778                             SATA_SUCCESS) {
6779                                 /* retry */
6780                                 rval = sata_initialize_device(sata_hba_inst,
6781                                     sdinfo);
6782                                 if (rval == SATA_RETRY)
6783                                         sata_log(sata_hba_inst, CE_WARN,
6784                                             "SATA device at port %d pmport %d -"
6785                                             " default device features could not"
6786                                             " be set. Device may not operate "
6787                                             "as expected.",
6788                                             sata_device.satadev_addr.cport,
6789                                             sata_device.satadev_addr.pmport);
6790                         }
6791                         if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0)
6792                                 scsi_hba_pkt_comp(scsipkt);
6793                         return;
6794                 } else if (rval == SATA_RETRY) {
6795                         delay(drv_usectohz(1000000 *
6796                             DOWNLOAD_WAIT_INTERVAL_SECS));
6797                         continue;
6798                 } else  /* failed - no reason to retry */
6799                         break;
6800         }
6801 
6802         /*
6803          * Something went wrong, device probing failed.
6804          */
6805         SATA_LOG_D((sata_hba_inst, CE_WARN,
6806             "Cannot probe device after downloading microcode\n"));
6807 
6808         /* Reset device to force retrying the probe. */
6809         (void) (*SATA_RESET_DPORT_FUNC(sata_hba_inst))
6810             (SATA_DIP(sata_hba_inst), &sata_device);
6811 
6812         if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0)
6813                 scsi_hba_pkt_comp(scsipkt);
6814 }
6815 
6816 




6775                         sdinfo = sata_get_device_info(sata_hba_inst,
6776                             &sata_device);
6777                         if (sata_initialize_device(sata_hba_inst, sdinfo) !=
6778                             SATA_SUCCESS) {
6779                                 /* retry */
6780                                 rval = sata_initialize_device(sata_hba_inst,
6781                                     sdinfo);
6782                                 if (rval == SATA_RETRY)
6783                                         sata_log(sata_hba_inst, CE_WARN,
6784                                             "SATA device at port %d pmport %d -"
6785                                             " default device features could not"
6786                                             " be set. Device may not operate "
6787                                             "as expected.",
6788                                             sata_device.satadev_addr.cport,
6789                                             sata_device.satadev_addr.pmport);
6790                         }
6791                         if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0)
6792                                 scsi_hba_pkt_comp(scsipkt);
6793                         return;
6794                 } else if (rval == SATA_RETRY) {
6795                         delay(drv_sectohz(DOWNLOAD_WAIT_INTERVAL_SECS));

6796                         continue;
6797                 } else  /* failed - no reason to retry */
6798                         break;
6799         }
6800 
6801         /*
6802          * Something went wrong, device probing failed.
6803          */
6804         SATA_LOG_D((sata_hba_inst, CE_WARN,
6805             "Cannot probe device after downloading microcode\n"));
6806 
6807         /* Reset device to force retrying the probe. */
6808         (void) (*SATA_RESET_DPORT_FUNC(sata_hba_inst))
6809             (SATA_DIP(sata_hba_inst), &sata_device);
6810 
6811         if ((scsipkt->pkt_flags & FLAG_NOINTR) == 0)
6812                 scsi_hba_pkt_comp(scsipkt);
6813 }
6814 
6815