svn commit: r203786 - in stable/8/sys: cam/scsi compat/linux
dev/aac dev/agp dev/amd dev/amr dev/arcmsr dev/ata
dev/ata/chipsets dev/ath/ath_hal/ar5211
dev/ath/ath_hal/ar5212 dev/ath/ath_hal/ar5416...
Matt Jacob
mjacob at FreeBSD.org
Thu Feb 11 18:34:08 UTC 2010
Author: mjacob
Date: Thu Feb 11 18:34:06 2010
New Revision: 203786
URL: http://svn.freebsd.org/changeset/base/203786
Log:
MFC a number of changes from head for ISP (203478,203463,203444,202418,201758,
201408,201325,200089,198822,197373,197372,197214,196162). Since one of those
changes was a semicolon cleanup from somebody else, this touches a lot more.
Deleted:
stable/8/sys/dev/isp/isp_tpublic.h
Modified:
stable/8/sys/cam/scsi/scsi_ses.c
stable/8/sys/cam/scsi/scsi_targ_bh.c
stable/8/sys/compat/linux/linux_futex.c
stable/8/sys/dev/aac/aac.c
stable/8/sys/dev/agp/agp.c
stable/8/sys/dev/amd/amd.c
stable/8/sys/dev/amr/amr.c
stable/8/sys/dev/arcmsr/arcmsr.c
stable/8/sys/dev/ata/ata-raid.c
stable/8/sys/dev/ata/chipsets/ata-ahci.c
stable/8/sys/dev/ata/chipsets/ata-siliconimage.c
stable/8/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c
stable/8/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c
stable/8/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
stable/8/sys/dev/bktr/bktr_i2c.c
stable/8/sys/dev/cs/if_cs.c
stable/8/sys/dev/cxgb/cxgb_sge.c
stable/8/sys/dev/de/if_de.c
stable/8/sys/dev/e1000/if_em.c
stable/8/sys/dev/fatm/if_fatm.c
stable/8/sys/dev/firewire/sbp.c
stable/8/sys/dev/hatm/if_hatm.c
stable/8/sys/dev/hptmv/entry.c
stable/8/sys/dev/if_ndis/if_ndis_usb.c
stable/8/sys/dev/iscsi/initiator/isc_sm.c
stable/8/sys/dev/isp/isp.c
stable/8/sys/dev/isp/isp_freebsd.c
stable/8/sys/dev/isp/isp_freebsd.h
stable/8/sys/dev/isp/isp_library.c
stable/8/sys/dev/isp/isp_library.h
stable/8/sys/dev/isp/isp_pci.c
stable/8/sys/dev/isp/isp_sbus.c
stable/8/sys/dev/isp/isp_stds.h
stable/8/sys/dev/isp/ispmbox.h
stable/8/sys/dev/isp/ispvar.h
stable/8/sys/dev/ixgbe/ixgbe.c
stable/8/sys/dev/malo/if_malo.c
stable/8/sys/dev/mge/if_mge.c
stable/8/sys/dev/mxge/if_mxge.c
stable/8/sys/dev/patm/if_patm_intr.c
stable/8/sys/dev/pdq/if_fea.c
stable/8/sys/dev/safe/safe.c
stable/8/sys/dev/sound/pci/maestro3.c
stable/8/sys/dev/ste/if_ste.c
stable/8/sys/dev/trm/trm.c
stable/8/sys/dev/usb/controller/musb_otg.c
stable/8/sys/dev/usb/storage/umass.c
stable/8/sys/gnu/fs/xfs/FreeBSD/xfs_vnops.c
stable/8/sys/isa/pnp.c
stable/8/sys/kern/kern_fail.c
stable/8/sys/kern/subr_firmware.c
stable/8/sys/mips/adm5120/if_admsw.c
stable/8/sys/mips/mips/elf_machdep.c
stable/8/sys/net/flowtable.c
stable/8/sys/net80211/ieee80211_node.c
stable/8/sys/netinet/libalias/alias_db.c
stable/8/sys/netinet/libalias/alias_mod.c
stable/8/sys/netinet/sctp_asconf.c
stable/8/sys/netinet/sctputil.c
stable/8/sys/nfsclient/bootp_subr.c
stable/8/sys/pci/ncr.c
stable/8/sys/powerpc/aim/mmu_oea.c
stable/8/sys/powerpc/aim/mmu_oea64.c
stable/8/sys/powerpc/booke/pmap.c
stable/8/sys/rpc/clnt_dg.c
stable/8/sys/ufs/ffs/ffs_snapshot.c
stable/8/sys/xen/xenbus/xenbus_probe.c
Directory Properties:
stable/8/sys/ (props changed)
stable/8/sys/amd64/include/xen/ (props changed)
stable/8/sys/cddl/contrib/opensolaris/ (props changed)
stable/8/sys/contrib/dev/acpica/ (props changed)
stable/8/sys/contrib/pf/ (props changed)
stable/8/sys/dev/xen/xenpci/ (props changed)
stable/8/sys/netinet/ (props changed)
Modified: stable/8/sys/cam/scsi/scsi_ses.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_ses.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/cam/scsi/scsi_ses.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -1555,7 +1555,7 @@ ses_encode(char *b, int amt, uint8_t *ep
*/
static int safte_getconfig(ses_softc_t *);
-static int safte_rdstat(ses_softc_t *, int);;
+static int safte_rdstat(ses_softc_t *, int);
static int set_objstat_sel(ses_softc_t *, ses_objstat *, int);
static int wrbuf16(ses_softc_t *, uint8_t, uint8_t, uint8_t, uint8_t, int);
static void wrslot_stat(ses_softc_t *, int);
@@ -2257,7 +2257,7 @@ safte_rdstat(ses_softc_t *ssc, int slpfl
ssc->ses_objmap[oid].encstat[0] = SES_OBJSTAT_NOTAVAIL;
ssc->ses_objmap[oid].encstat[1] = 0;
ssc->ses_objmap[oid].encstat[2] = sdata[r];
- ssc->ses_objmap[oid].encstat[3] = 0;;
+ ssc->ses_objmap[oid].encstat[3] = 0;
ssc->ses_objmap[oid++].svalid = 1;
r++;
}
Modified: stable/8/sys/cam/scsi/scsi_targ_bh.c
==============================================================================
--- stable/8/sys/cam/scsi/scsi_targ_bh.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/cam/scsi/scsi_targ_bh.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -429,7 +429,7 @@ targbhdtor(struct cam_periph *periph)
switch (softc->init_level) {
case 0:
- panic("targdtor - impossible init level");;
+ panic("targdtor - impossible init level");
case 1:
/* FALLTHROUGH */
default:
Modified: stable/8/sys/compat/linux/linux_futex.c
==============================================================================
--- stable/8/sys/compat/linux/linux_futex.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/compat/linux/linux_futex.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -493,7 +493,7 @@ linux_sys_futex(struct thread *td, struc
return (error);
if (f == NULL) {
td->td_retval[0] = 0;
- return (error);;
+ return (error);
}
td->td_retval[0] = futex_wake(f, args->val);
futex_put(f, NULL);
Modified: stable/8/sys/dev/aac/aac.c
==============================================================================
--- stable/8/sys/dev/aac/aac.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/aac/aac.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -553,7 +553,7 @@ aac_alloc(struct aac_softc *sc)
0, /* flags */
NULL, NULL, /* No locking needed */
&sc->aac_fib_dmat)) {
- device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");;
+ device_printf(sc->aac_dev, "can't allocate FIB DMA tag\n");
return (ENOMEM);
}
Modified: stable/8/sys/dev/agp/agp.c
==============================================================================
--- stable/8/sys/dev/agp/agp.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/agp/agp.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -763,7 +763,7 @@ agp_allocate_user(device_t dev, agp_allo
static int
agp_deallocate_user(device_t dev, int id)
{
- struct agp_memory *mem = agp_find_memory(dev, id);;
+ struct agp_memory *mem = agp_find_memory(dev, id);
if (mem) {
AGP_FREE_MEMORY(dev, mem);
Modified: stable/8/sys/dev/amd/amd.c
==============================================================================
--- stable/8/sys/dev/amd/amd.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/amd/amd.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -1657,7 +1657,7 @@ amdhandlemsgreject(struct amd_softc *amd
tinfo_sync_period[pDCB->SyncPeriod - 4];
pDCB->tinfo.goal.offset = pDCB->SyncOffset;
pDCB->tinfo.current.period =
- tinfo_sync_period[pDCB->SyncPeriod - 4];;
+ tinfo_sync_period[pDCB->SyncPeriod - 4];
pDCB->tinfo.current.offset = pDCB->SyncOffset;
/*
Modified: stable/8/sys/dev/amr/amr.c
==============================================================================
--- stable/8/sys/dev/amr/amr.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/amr/amr.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -221,7 +221,7 @@ amr_attach(struct amr_softc *sc)
sc->amr_submit_command = amr_std_submit_command;
sc->amr_get_work = amr_std_get_work;
sc->amr_poll_command = amr_std_poll_command;
- amr_std_attach_mailbox(sc);;
+ amr_std_attach_mailbox(sc);
}
#ifdef AMR_BOARD_INIT
Modified: stable/8/sys/dev/arcmsr/arcmsr.c
==============================================================================
--- stable/8/sys/dev/arcmsr/arcmsr.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/arcmsr/arcmsr.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -1940,7 +1940,7 @@ static void arcmsr_handle_virtual_comman
switch (pccb->csio.cdb_io.cdb_bytes[0]) {
case INQUIRY: {
unsigned char inqdata[36];
- char *buffer=pccb->csio.data_ptr;;
+ char *buffer=pccb->csio.data_ptr;
if (pccb->ccb_h.target_lun) {
pccb->ccb_h.status |= CAM_SEL_TIMEOUT;
Modified: stable/8/sys/dev/ata/ata-raid.c
==============================================================================
--- stable/8/sys/dev/ata/ata-raid.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/ata/ata-raid.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -407,7 +407,7 @@ ata_raid_strategy(struct bio *bp)
if (rdp->status & AR_S_REBUILDING)
blk = ((lba / rdp->interleave) * rdp->width) * rdp->interleave +
(rdp->interleave * (drv % rdp->width)) +
- lba % rdp->interleave;;
+ lba % rdp->interleave;
if (bp->bio_cmd == BIO_READ) {
int src_online =
Modified: stable/8/sys/dev/ata/chipsets/ata-ahci.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-ahci.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/ata/chipsets/ata-ahci.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -656,9 +656,9 @@ ata_ahci_pm_write(device_t dev, int port
ctp->cfis[3] = reg;
ctp->cfis[7] = port | ATA_D_LBA;
ctp->cfis[12] = value & 0xff;
- ctp->cfis[4] = (value >> 8) & 0xff;;
- ctp->cfis[5] = (value >> 16) & 0xff;;
- ctp->cfis[6] = (value >> 24) & 0xff;;
+ ctp->cfis[4] = (value >> 8) & 0xff;
+ ctp->cfis[5] = (value >> 16) & 0xff;
+ ctp->cfis[6] = (value >> 24) & 0xff;
ctp->cfis[15] = ATA_A_4BIT;
if (ata_ahci_issue_cmd(dev, 0, 100)) {
Modified: stable/8/sys/dev/ata/chipsets/ata-siliconimage.c
==============================================================================
--- stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/ata/chipsets/ata-siliconimage.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -716,9 +716,9 @@ ata_siiprb_pm_write(device_t dev, int po
prb->fis[3] = reg;
prb->fis[7] = port;
prb->fis[12] = value & 0xff;
- prb->fis[4] = (value >> 8) & 0xff;;
- prb->fis[5] = (value >> 16) & 0xff;;
- prb->fis[6] = (value >> 24) & 0xff;;
+ prb->fis[4] = (value >> 8) & 0xff;
+ prb->fis[5] = (value >> 16) & 0xff;
+ prb->fis[6] = (value >> 24) & 0xff;
if (ata_siiprb_issue_cmd(dev)) {
device_printf(dev, "error writing PM port\n");
return ATA_E_ABORT;
Modified: stable/8/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c
==============================================================================
--- stable/8/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/ath/ath_hal/ar5211/ar5211_reset.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -136,7 +136,7 @@ static void ar5211GetLowerUpperPcdacs(ui
uint16_t channel, const PCDACS_EEPROM *pSrcStruct,
uint16_t *pLowerPcdac, uint16_t *pUpperPcdac);
-static void ar5211SetRfgain(struct ath_hal *, const GAIN_VALUES *);;
+static void ar5211SetRfgain(struct ath_hal *, const GAIN_VALUES *);
static void ar5211RequestRfgain(struct ath_hal *);
static HAL_BOOL ar5211InvalidGainReadback(struct ath_hal *, GAIN_VALUES *);
static HAL_BOOL ar5211IsGainAdjustNeeded(struct ath_hal *, const GAIN_VALUES *);
Modified: stable/8/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c
==============================================================================
--- stable/8/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/ath/ath_hal/ar5212/ar5212_interrupts.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -76,7 +76,7 @@ ar5212GetPendingInterrupts(struct ath_ha
isr = OS_REG_READ(ah, AR_ISR_RAC);
if (isr == 0xffffffff) {
*masked = 0;
- return AH_FALSE;;
+ return AH_FALSE;
}
*masked = isr & HAL_INT_COMMON;
Modified: stable/8/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c
==============================================================================
--- stable/8/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/ath/ath_hal/ar5416/ar5416_interrupts.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -104,7 +104,7 @@ ar5416GetPendingInterrupts(struct ath_ha
isr = OS_REG_READ(ah, AR_ISR_RAC);
if (isr == 0xffffffff) {
*masked = 0;
- return AH_FALSE;;
+ return AH_FALSE;
}
*masked = isr & HAL_INT_COMMON;
Modified: stable/8/sys/dev/bktr/bktr_i2c.c
==============================================================================
--- stable/8/sys/dev/bktr/bktr_i2c.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/bktr/bktr_i2c.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -331,7 +331,7 @@ bti2c_smb_readb(device_t dev, u_char sla
/* clear status bits */
OUTL(sc,BKTR_INT_STAT, (BT848_INT_RACK | BT848_INT_I2CDONE));
- OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd);;
+ OUTL(sc,BKTR_I2C_DATA_CTL, ((slave & 0xff) << 24) | (u_char)cmd);
BTI2C_DEBUG(printf("r%lx/", (u_long)(((slave & 0xff) << 24) | (u_char)cmd)));
Modified: stable/8/sys/dev/cs/if_cs.c
==============================================================================
--- stable/8/sys/dev/cs/if_cs.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/cs/if_cs.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -475,7 +475,7 @@ int
cs_attach(device_t dev)
{
int error, media=0;
- struct cs_softc *sc = device_get_softc(dev);;
+ struct cs_softc *sc = device_get_softc(dev);
struct ifnet *ifp;
sc->dev = dev;
Modified: stable/8/sys/dev/cxgb/cxgb_sge.c
==============================================================================
--- stable/8/sys/dev/cxgb/cxgb_sge.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/cxgb/cxgb_sge.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -152,7 +152,7 @@ struct rx_desc {
uint32_t len_gen;
uint32_t gen2;
uint32_t addr_hi;
-} __packed;;
+} __packed;
struct rsp_desc { /* response queue descriptor */
struct rss_header rss_hdr;
Modified: stable/8/sys/dev/de/if_de.c
==============================================================================
--- stable/8/sys/dev/de/if_de.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/de/if_de.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -2289,7 +2289,7 @@ tulip_identify_asante_nic(tulip_softc_t
mi->mi_gpr_length = 0;
mi->mi_gpr_offset = 0;
mi->mi_reset_length = 0;
- mi->mi_reset_offset = 0;;
+ mi->mi_reset_offset = 0;
mi->mi_phyaddr = TULIP_MII_NOPHY;
for (idx = 20; idx > 0 && mi->mi_phyaddr == TULIP_MII_NOPHY; idx--) {
Modified: stable/8/sys/dev/e1000/if_em.c
==============================================================================
--- stable/8/sys/dev/e1000/if_em.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/e1000/if_em.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -4446,7 +4446,7 @@ em_free_receive_structures(struct adapte
static int
em_rxeof(struct adapter *adapter, int count)
{
- struct ifnet *ifp = adapter->ifp;;
+ struct ifnet *ifp = adapter->ifp;
struct mbuf *mp;
u8 status, accept_frame = 0, eop = 0;
u16 len, desc_len, prev_len_adj;
Modified: stable/8/sys/dev/fatm/if_fatm.c
==============================================================================
--- stable/8/sys/dev/fatm/if_fatm.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/fatm/if_fatm.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -860,7 +860,7 @@ fatm_getprom(struct fatm_softc *sc)
NEXT_QUEUE_ENTRY(sc->cmdqueue.head, FATM_CMD_QLEN);
q->error = 0;
- q->cb = NULL;;
+ q->cb = NULL;
H_SETSTAT(q->q.statp, FATM_STAT_PENDING);
H_SYNCSTAT_PREWRITE(sc, q->q.statp);
Modified: stable/8/sys/dev/firewire/sbp.c
==============================================================================
--- stable/8/sys/dev/firewire/sbp.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/firewire/sbp.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -1573,7 +1573,7 @@ END_DEBUG
bcopy(&sbp_cmd_status->s_keydep[0],
&sense->sense_key_spec[0], 3);
- ocb->ccb->csio.scsi_status = sbp_cmd_status->status;;
+ ocb->ccb->csio.scsi_status = sbp_cmd_status->status;
ocb->ccb->ccb_h.status = CAM_SCSI_STATUS_ERROR
| CAM_AUTOSNS_VALID;
/*
@@ -2148,7 +2148,7 @@ sbp_free_target(struct sbp_target *targe
}
STAILQ_INIT(&target->xferlist);
free(target->luns, M_SBP);
- target->num_lun = 0;;
+ target->num_lun = 0;
target->luns = NULL;
target->fwdev = NULL;
}
@@ -2318,7 +2318,7 @@ sbp_timeout(void *arg)
sbp_cam_detach_target(target);
if (target->luns != NULL)
free(target->luns, M_SBP);
- target->num_lun = 0;;
+ target->num_lun = 0;
target->luns = NULL;
target->fwdev = NULL;
#endif
Modified: stable/8/sys/dev/hatm/if_hatm.c
==============================================================================
--- stable/8/sys/dev/hatm/if_hatm.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/hatm/if_hatm.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -836,7 +836,7 @@ hatm_init_rx_buffer_pool(struct hatm_sof
uint32_t lbuf_addr; /* address of current buffer */
u_int i;
- row_size = sc->bytes_per_row;;
+ row_size = sc->bytes_per_row;
row_addr = start * row_size;
lbuf_size = sc->cells_per_lbuf * 48;
lbufs_per_row = sc->cells_per_row / sc->cells_per_lbuf;
@@ -889,7 +889,7 @@ hatm_init_tx_buffer_pool(struct hatm_sof
uint32_t lbuf_addr; /* address of current buffer */
u_int i;
- row_size = sc->bytes_per_row;;
+ row_size = sc->bytes_per_row;
row_addr = start * row_size;
lbuf_size = sc->cells_per_lbuf * 48;
lbufs_per_row = sc->cells_per_row / sc->cells_per_lbuf;
Modified: stable/8/sys/dev/hptmv/entry.c
==============================================================================
--- stable/8/sys/dev/hptmv/entry.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/hptmv/entry.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -1341,7 +1341,7 @@ init_adapter(IAL_ADAPTER_T *pAdapter)
#endif
&pAdapter->io_dma_parent /* tag */))
{
- return ENXIO;;
+ return ENXIO;
}
Modified: stable/8/sys/dev/if_ndis/if_ndis_usb.c
==============================================================================
--- stable/8/sys/dev/if_ndis/if_ndis_usb.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/if_ndis/if_ndis_usb.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -204,7 +204,7 @@ ndisusb_detach(device_t self)
{
int i;
struct ndis_softc *sc = device_get_softc(self);
- struct ndisusb_ep *ne;;
+ struct ndisusb_ep *ne;
sc->ndisusb_status |= NDISUSB_STATUS_DETACH;
Modified: stable/8/sys/dev/iscsi/initiator/isc_sm.c
==============================================================================
--- stable/8/sys/dev/iscsi/initiator/isc_sm.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/iscsi/initiator/isc_sm.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -399,7 +399,7 @@ ism_recv(isc_session_t *sp, pduq_t *pq)
if(sp->flags & ISC_STALLED) {
sdebug(4, "window opened: max=0x%x exp=0x%x opcode=0x%x cmd=0x%x cws=%d.",
sn->maxCmd, sn->expCmd, bhs->opcode, sn->cmd, sp->cws);
- sp->flags &= ~ISC_STALLED;;
+ sp->flags &= ~ISC_STALLED;
}
}
}
Modified: stable/8/sys/dev/isp/isp.c
==============================================================================
--- stable/8/sys/dev/isp/isp.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/isp/isp.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -63,7 +63,6 @@ __FBSDID("$FreeBSD$");
/*
* General defines
*/
-
#define MBOX_DELAY_COUNT 1000000 / 100
#define ISP_MARK_PORTDB(a, b, c) \
isp_prt(isp, ISP_LOGSANCFG, \
@@ -695,7 +694,7 @@ isp_reset(ispsoftc_t *isp, int do_load_d
mbs.logval = MBLOGALL;
isp_mboxcmd(isp, &mbs);
if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
- isp_prt(isp, ISP_LOGERR, "NOP ommand failed (%x)", mbs.param[0]);
+ isp_prt(isp, ISP_LOGERR, "NOP command failed (%x)", mbs.param[0]);
ISP_RESET0(isp);
return;
}
@@ -1547,24 +1546,18 @@ isp_fibre_init(ispsoftc_t *isp)
}
icbp->icb_maxfrmlen = DEFAULT_FRAMESIZE(isp);
- if (icbp->icb_maxfrmlen < ICB_MIN_FRMLEN ||
- icbp->icb_maxfrmlen > ICB_MAX_FRMLEN) {
- isp_prt(isp, ISP_LOGERR,
- "bad frame length (%d) from NVRAM- using %d",
- DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN);
+ if (icbp->icb_maxfrmlen < ICB_MIN_FRMLEN || icbp->icb_maxfrmlen > ICB_MAX_FRMLEN) {
+ isp_prt(isp, ISP_LOGERR, "bad frame length (%d) from NVRAM- using %d", DEFAULT_FRAMESIZE(isp), ICB_DFLT_FRMLEN);
icbp->icb_maxfrmlen = ICB_DFLT_FRMLEN;
}
icbp->icb_maxalloc = fcp->isp_maxalloc;
if (icbp->icb_maxalloc < 1) {
- isp_prt(isp, ISP_LOGERR,
- "bad maximum allocation (%d)- using 16", fcp->isp_maxalloc);
+ isp_prt(isp, ISP_LOGERR, "bad maximum allocation (%d)- using 16", fcp->isp_maxalloc);
icbp->icb_maxalloc = 16;
}
icbp->icb_execthrottle = DEFAULT_EXEC_THROTTLE(isp);
if (icbp->icb_execthrottle < 1) {
- isp_prt(isp, ISP_LOGERR,
- "bad execution throttle of %d- using %d",
- DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE);
+ isp_prt(isp, ISP_LOGERR, "bad execution throttle of %d- using %d", DEFAULT_EXEC_THROTTLE(isp), ICB_DFLT_THROTTLE);
icbp->icb_execthrottle = ICB_DFLT_THROTTLE;
}
icbp->icb_retry_delay = fcp->isp_retry_delay;
@@ -1658,18 +1651,18 @@ isp_fibre_init(ispsoftc_t *isp)
/*
* For 22XX > 2.1.26 && 23XX, set some options.
- * XXX: Probably okay for newer 2100 f/w too.
*/
if (ISP_FW_NEWER_THAN(isp, 2, 26, 0)) {
- /*
- * Turn on LIP F8 async event (1)
- * Turn on generate AE 8013 on all LIP Resets (2)
- * Disable LIP F7 switching (8)
- */
MBSINIT(&mbs, MBOX_SET_FIRMWARE_OPTIONS, MBLOGALL, 0);
- mbs.param[1] = 0xb;
+ mbs.param[1] = IFCOPT1_DISF7SWTCH|IFCOPT1_LIPASYNC|IFCOPT1_LIPF8;
mbs.param[2] = 0;
mbs.param[3] = 0;
+ if (ISP_FW_NEWER_THAN(isp, 3, 16, 0)) {
+ mbs.param[1] |= IFCOPT1_EQFQASYNC|IFCOPT1_CTIO_RETRY;
+ if (fcp->role & ISP_ROLE_TARGET) {
+ mbs.param[3] = IFCOPT3_NOPRLI;
+ }
+ }
isp_mboxcmd(isp, &mbs);
if (mbs.param[0] != MBOX_COMMAND_COMPLETE) {
return;
@@ -2093,8 +2086,7 @@ isp_mark_portdb(ispsoftc_t *isp, int cha
* or via FABRIC LOGIN/FABRIC LOGOUT for other cards.
*/
static int
-isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid,
- int flags, int gs)
+isp_plogx(ispsoftc_t *isp, int chan, uint16_t handle, uint32_t portid, int flags, int gs)
{
mbreg_t mbs;
uint8_t q[QENTRY_LEN];
@@ -2771,21 +2763,15 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
/*
* Make sure we're okay for doing this right now.
*/
- if (fcp->isp_loopstate != LOOP_PDB_RCVD &&
- fcp->isp_loopstate != LOOP_FSCAN_DONE &&
- fcp->isp_loopstate != LOOP_LSCAN_DONE) {
- isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d",
- fcp->isp_loopstate);
+ if (fcp->isp_loopstate != LOOP_PDB_RCVD && fcp->isp_loopstate != LOOP_FSCAN_DONE && fcp->isp_loopstate != LOOP_LSCAN_DONE) {
+ isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: bad loopstate %d", fcp->isp_loopstate);
return (-1);
}
- if (fcp->isp_topo == TOPO_FL_PORT ||
- fcp->isp_topo == TOPO_NL_PORT ||
- fcp->isp_topo == TOPO_N_PORT) {
+ if (fcp->isp_topo == TOPO_FL_PORT || fcp->isp_topo == TOPO_NL_PORT || fcp->isp_topo == TOPO_N_PORT) {
if (fcp->isp_loopstate < LOOP_LSCAN_DONE) {
if (isp_scan_loop(isp, chan) != 0) {
- isp_prt(isp, ISP_LOGWARN,
- "isp_pdb_sync: isp_scan_loop failed");
+ isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: isp_scan_loop failed");
return (-1);
}
}
@@ -2794,15 +2780,13 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
if (fcp->isp_topo == TOPO_F_PORT || fcp->isp_topo == TOPO_FL_PORT) {
if (fcp->isp_loopstate < LOOP_FSCAN_DONE) {
if (isp_scan_fabric(isp, chan) != 0) {
- isp_prt(isp, ISP_LOGWARN,
- "isp_pdb_sync: isp_scan_fabric failed");
+ isp_prt(isp, ISP_LOGWARN, "isp_pdb_sync: isp_scan_fabric failed");
return (-1);
}
}
}
- isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0,
- "Chan %d Synchronizing PDBs", chan);
+ isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d Synchronizing PDBs", chan);
fcp->isp_loopstate = LOOP_SYNCING_PDB;
@@ -2831,11 +2815,7 @@ isp_pdb_sync(ispsoftc_t *isp, int chan)
lp->state = FC_PORTDB_STATE_NIL;
isp_async(isp, ISPASYNC_DEV_GONE, chan, lp);
if (lp->autologin == 0) {
- (void) isp_plogx(isp, chan, lp->handle,
- lp->portid,
- PLOGX_FLG_CMD_LOGO |
- PLOGX_FLG_IMPLICIT |
- PLOGX_FLG_FREE_NPHDL, 0);
+ (void) isp_plogx(isp, chan, lp->handle, lp->portid, PLOGX_FLG_CMD_LOGO | PLOGX_FLG_IMPLICIT | PLOGX_FLG_FREE_NPHDL, 0);
} else {
lp->autologin = 0;
}
@@ -3081,8 +3061,7 @@ isp_scan_loop(ispsoftc_t *isp, int chan)
for (i = 0; i < MAX_FC_TARG; i++) {
lp = &fcp->portdb[i];
- if (lp->state == FC_PORTDB_STATE_NIL ||
- lp->target_mode) {
+ if (lp->state == FC_PORTDB_STATE_NIL || lp->target_mode) {
continue;
}
if (lp->node_wwn != tmp.node_wwn) {
@@ -3600,8 +3579,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha
for (dbidx = 0; dbidx < MAX_FC_TARG; dbidx++) {
lp = &fcp->portdb[dbidx];
- if (lp->state != FC_PORTDB_STATE_PROBATIONAL ||
- lp->target_mode) {
+ if (lp->state != FC_PORTDB_STATE_PROBATIONAL || lp->target_mode) {
continue;
}
if (lp->portid == portid) {
@@ -3838,8 +3816,7 @@ isp_scan_fabric(ispsoftc_t *isp, int cha
if (fcp->portdb[dbidx].target_mode) {
continue;
}
- if (fcp->portdb[dbidx].node_wwn == wwnn &&
- fcp->portdb[dbidx].port_wwn == wwpn) {
+ if (fcp->portdb[dbidx].node_wwn == wwnn && fcp->portdb[dbidx].port_wwn == wwpn) {
break;
}
}
@@ -4425,7 +4402,7 @@ isp_start(XS_T *xs)
*tptr = 0x1999;
}
- if (isp_save_xs(isp, xs, &handle)) {
+ if (isp_allocate_xs(isp, xs, &handle)) {
isp_prt(isp, ISP_LOGDEBUG0, "out of xflist pointers");
XS_SETERR(xs, HBA_BOTCH);
return (CMD_EAGAIN);
@@ -5171,8 +5148,8 @@ again:
}
}
- if ((sp->req_handle != ISP_SPCL_HANDLE) && (sp->req_handle > isp->isp_maxcmds || sp->req_handle < 1)) {
- isp_prt(isp, ISP_LOGERR, "bad request handle %d (type 0x%x)", sp->req_handle, etype);
+ if (!ISP_VALID_HANDLE(isp, sp->req_handle)) {
+ isp_prt(isp, ISP_LOGERR, "bad request handle 0x%x (iocb type 0x%x)", sp->req_handle, etype);
ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */
ISP_WRITE(isp, isp->isp_respoutrp, optr);
continue;
@@ -5186,14 +5163,13 @@ again:
*/
if (etype != RQSTYPE_RESPONSE) {
isp_prt(isp, ISP_LOGERR, "cannot find handle 0x%x (type 0x%x)", sp->req_handle, etype);
- } else if (ts != RQCS_ABORTED && ts != RQCS_RESET_OCCURRED && sp->req_handle != ISP_SPCL_HANDLE) {
+ } else if (ts != RQCS_ABORTED && ts != RQCS_RESET_OCCURRED) {
isp_prt(isp, ISP_LOGERR, "cannot find handle 0x%x (status 0x%x)", sp->req_handle, ts);
}
ISP_MEMZERO(hp, QENTRY_LEN); /* PERF */
ISP_WRITE(isp, isp->isp_respoutrp, optr);
continue;
}
- isp_destroy_handle(isp, sp->req_handle);
if (req_status_flags & RQSTF_BUS_RESET) {
XS_SETERR(xs, HBA_BUSRESET);
ISP_SET_SENDMARKER(isp, XS_CHANNEL(xs), 1);
@@ -5329,6 +5305,7 @@ again:
if (XS_XFRLEN(xs)) {
ISP_DMAFREE(isp, xs, sp->req_handle);
}
+ isp_destroy_handle(isp, sp->req_handle);
if (((isp->isp_dblev & (ISP_LOGDEBUG1|ISP_LOGDEBUG2|ISP_LOGDEBUG3))) ||
((isp->isp_dblev & ISP_LOGDEBUG0) && ((!XS_NOERR(xs)) ||
@@ -5689,16 +5666,19 @@ isp_parse_async(ispsoftc_t *isp, uint16_
* commands that complete (with no apparent error) after
* we receive a LIP. This has been observed mostly on
* Local Loop topologies. To be safe, let's just mark
- * all active commands as dead.
+ * all active initiator commands as dead.
*/
if (topo == TOPO_NL_PORT || topo == TOPO_FL_PORT) {
int i, j;
for (i = j = 0; i < isp->isp_maxcmds; i++) {
XS_T *xs;
- xs = isp->isp_xflist[i];
- if (xs == NULL) {
+ isp_hdl_t *hdp;
+
+ hdp = &isp->isp_xflist[i];
+ if (ISP_H2HT(hdp->handle) != ISP_HANDLE_INITIATOR) {
continue;
}
+ xs = hdp->cmd;
if (XS_CHANNEL(xs) != chan) {
continue;
}
@@ -6666,8 +6646,8 @@ isp_mbox_continue(ispsoftc_t *isp)
ptr = isp->isp_mbxworkp;
switch (isp->isp_lastmbxcmd) {
case MBOX_WRITE_RAM_WORD:
- mbs.param[1] = isp->isp_mbxwrk1++;;
- mbs.param[2] = *ptr++;;
+ mbs.param[1] = isp->isp_mbxwrk1++;
+ mbs.param[2] = *ptr++;
break;
case MBOX_READ_RAM_WORD:
*ptr++ = isp->isp_mboxtmp[2];
@@ -6677,7 +6657,7 @@ isp_mbox_continue(ispsoftc_t *isp)
offset = isp->isp_mbxwrk1;
offset |= isp->isp_mbxwrk8 << 16;
- mbs.param[2] = *ptr++;;
+ mbs.param[2] = *ptr++;
mbs.param[1] = offset;
mbs.param[8] = offset >> 16;
isp->isp_mbxwrk1 = ++offset;
@@ -8293,6 +8273,8 @@ isp_parse_nvram_2100(ispsoftc_t *isp, ui
if ((wwn >> 60) == 0) {
wwn |= (((uint64_t) 2)<< 60);
}
+ } else {
+ wwn = fcp->isp_wwpn_nvram & ~((uint64_t) 0xfff << 48);
}
} else {
wwn &= ~((uint64_t) 0xfff << 48);
@@ -8358,11 +8340,6 @@ isp_parse_nvram_2400(ispsoftc_t *isp, ui
ISP2400_NVRAM_FIRMWARE_OPTIONS3(nvram_data));
wwn = ISP2400_NVRAM_PORT_NAME(nvram_data);
- if (wwn) {
- if ((wwn >> 60) != 2 && (wwn >> 60) != 5) {
- wwn = 0;
- }
- }
fcp->isp_wwpn_nvram = wwn;
wwn = ISP2400_NVRAM_NODE_NAME(nvram_data);
@@ -8371,6 +8348,10 @@ isp_parse_nvram_2400(ispsoftc_t *isp, ui
wwn = 0;
}
}
+ if (wwn == 0 && (fcp->isp_wwpn_nvram >> 60) == 2) {
+ wwn = fcp->isp_wwpn_nvram;
+ wwn &= ~((uint64_t) 0xfff << 48);
+ }
fcp->isp_wwnn_nvram = wwn;
if (ISP2400_NVRAM_EXCHANGE_COUNT(nvram_data)) {
Modified: stable/8/sys/dev/isp/isp_freebsd.c
==============================================================================
--- stable/8/sys/dev/isp/isp_freebsd.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/isp/isp_freebsd.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -133,33 +133,37 @@ isp_attach_chan(ispsoftc_t *isp, struct
}
#endif
} else {
+ fcparam *fcp = FCPARAM(isp, chan);
struct isp_fc *fc = ISP_FC_PC(isp, chan);
+ ISP_LOCK(isp);
fc->sim = sim;
fc->path = path;
fc->isp = isp;
+ fc->ready = 1;
callout_init_mtx(&fc->ldt, &isp->isp_osinfo.lock, 0);
callout_init_mtx(&fc->gdt, &isp->isp_osinfo.lock, 0);
-
- if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) {
- xpt_free_path(fc->path);
- ISP_LOCK(isp);
- xpt_bus_deregister(cam_sim_path(fc->sim));
- ISP_UNLOCK(isp);
- cam_sim_free(fc->sim, FALSE);
- }
/*
* We start by being "loop down" if we have an initiator role
*/
- ISP_LOCK(isp);
- if ((FCPARAM(isp, chan)->role & ISP_ROLE_INITIATOR) && fc->ldt_running == 0) {
+ if (fcp->role & ISP_ROLE_INITIATOR) {
isp_freeze_loopdown(isp, chan, "isp_attach");
- fc->ldt_running = 1;
callout_reset(&fc->ldt, isp_quickboot_time * hz, isp_ldt, fc);
isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Starting Initial Loop Down Timer @ %lu", (unsigned long) time_uptime);
}
ISP_UNLOCK(isp);
+ if (THREAD_CREATE(isp_kthread, fc, &fc->kproc, 0, 0, "%s: fc_thrd%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) {
+ xpt_free_path(fc->path);
+ ISP_LOCK(isp);
+ if (callout_active(&fc->ldt)) {
+ callout_stop(&fc->ldt);
+ }
+ xpt_bus_deregister(cam_sim_path(fc->sim));
+ ISP_UNLOCK(isp);
+ cam_sim_free(fc->sim, FALSE);
+ return (ENOMEM);
+ }
#ifdef ISP_INTERNAL_TARGET
ISP_SET_PC(isp, chan, proc_active, 1);
if (THREAD_CREATE(isp_target_thread_fc, fc, &fc->target_proc, 0, 0, "%s: isp_test_tgt%d", device_get_nameunit(isp->isp_osinfo.dev), chan)) {
@@ -343,6 +347,17 @@ ispioctl(struct cdev *dev, u_long c, cad
break;
}
if (IS_FC(isp)) {
+ /*
+ * We don't really support dual role at present on FC cards.
+ *
+ * We should, but a bunch of things are currently broken,
+ * so don't allow it.
+ */
+ if (nr == ISP_ROLE_BOTH) {
+ isp_prt(isp, ISP_LOGERR, "cannot support dual role at present");
+ retval = EINVAL;
+ break;
+ }
*(int *)addr = FCPARAM(isp, chan)->role;
#ifdef ISP_INTERNAL_TARGET
ISP_LOCK(isp);
@@ -1638,7 +1653,7 @@ isp_target_start_ctio(ispsoftc_t *isp, u
cto->ct_timeout = 10;
}
- if (isp_save_xs_tgt(isp, ccb, &handle)) {
+ if (isp_allocate_xs_tgt(isp, ccb, &handle)) {
xpt_print(ccb->ccb_h.path, "No XFLIST pointers for %s\n", __func__);
ccb->ccb_h.status = CAM_REQUEUE_REQ;
goto out;
@@ -2943,8 +2958,8 @@ isp_target_mark_aborted_early(ispsoftc_t
#ifdef ISP_INTERNAL_TARGET
// #define ISP_FORCE_TIMEOUT 1
-#define ISP_TEST_WWNS 1
-#define ISP_TEST_SEPARATE_STATUS 1
+// #define ISP_TEST_WWNS 1
+// #define ISP_TEST_SEPARATE_STATUS 1
#define ccb_data_offset ppriv_field0
#define ccb_atio ppriv_ptr1
@@ -3819,21 +3834,41 @@ isp_watchdog(void *arg)
isp = XS_ISP(xs);
handle = isp_find_handle(isp, xs);
- if (handle) {
+ if (handle != ISP_HANDLE_FREE) {
+ /*
+ * Try and make sure the command is really dead before
+ * we release the handle (and DMA resources) for reuse.
+ *
+ * If we are successful in aborting the command then
+ * we're done here because we'll get the command returned
+ * back separately.
+ */
+ if (isp_control(isp, ISPCTL_ABORT_CMD, xs) == 0) {
+ return;
+ }
+
+ /*
+ * Note that after calling the above, the command may in
+ * fact have been completed.
+ */
+ xs = isp_find_xs(isp, handle);
+
/*
- * Make sure the command is *really* dead before we
- * release the handle (and DMA resources) for reuse.
+ * If the command no longer exists, then we won't
+ * be able to find the xs again with this handle.
*/
- (void) isp_control(isp, ISPCTL_ABORT_CMD, xs);
+ if (xs == NULL) {
+ return;
+ }
/*
- * After this point, the comamnd is really dead.
+ * After this point, the command is really dead.
*/
if (XS_XFRLEN(xs)) {
ISP_DMAFREE(isp, xs, handle);
}
isp_destroy_handle(isp, handle);
- xpt_print(xs->ccb_h.path, "watchdog timeout for handle 0x%x\n", handle);
+ isp_prt(isp, ISP_LOGERR, "%s: timeout for handle 0x%x", __func__, handle);
XS_SETERR(xs, CAM_CMD_TIMEOUT);
isp_done(xs);
}
@@ -3924,12 +3959,12 @@ isp_gdt(void *arg)
isp_prt(isp, ISP_LOGCONFIG, prom3, chan, lp->portid, tgt, "Gone Device Timeout");
isp_make_gone(isp, chan, tgt);
}
- if (more_to_do) {
- fc->gdt_running = 1;
- callout_reset(&fc->gdt, hz, isp_gdt, fc);
- } else {
- isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d stopping Gone Device Timer", chan);
- fc->gdt_running = 0;
+ if (fc->ready) {
+ if (more_to_do) {
+ callout_reset(&fc->gdt, hz, isp_gdt, fc);
+ } else {
+ isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d stopping Gone Device Timer", chan);
+ }
}
}
@@ -4006,6 +4041,7 @@ isp_kthread(void *arg)
ispsoftc_t *isp = fc->isp;
int chan = fc - isp->isp_osinfo.pc.fc;
int slp = 0;
+
mtx_lock(&isp->isp_osinfo.lock);
for (;;) {
@@ -4238,6 +4274,7 @@ isp_action(struct cam_sim *sim, union cc
isp_disable_lun(isp, ccb);
}
break;
+ case XPT_IMMED_NOTIFY:
case XPT_IMMEDIATE_NOTIFY: /* Add Immediate Notify Resource */
case XPT_ACCEPT_TARGET_IO: /* Add Accept Target IO Resource */
{
@@ -4287,11 +4324,19 @@ isp_action(struct cam_sim *sim, union cc
SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle);
ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "Put FREE INOT, (seq id 0x%x) count now %d\n",
((struct ccb_immediate_notify *)ccb)->seq_id, tptr->inot_count);
+ } else if (ccb->ccb_h.func_code == XPT_IMMED_NOTIFY) {
+ tptr->inot_count++;
+ SLIST_INSERT_HEAD(&tptr->inots, &ccb->ccb_h, sim_links.sle);
+ ISP_PATH_PRT(isp, ISP_LOGTDEBUG0, ccb->ccb_h.path, "Put FREE INOT, (seq id 0x%x) count now %d\n",
+ ((struct ccb_immediate_notify *)ccb)->seq_id, tptr->inot_count);
}
rls_lun_statep(isp, tptr);
ccb->ccb_h.status = CAM_REQ_INPROG;
break;
}
+ case XPT_NOTIFY_ACK:
+ ccb->ccb_h.status = CAM_REQ_CMP_ERR;
+ break;
case XPT_NOTIFY_ACKNOWLEDGE: /* notify ack */
{
tstate_t *tptr;
@@ -4601,10 +4646,21 @@ isp_prt(isp, ISP_LOGALL, "Setting Channe
}
break;
case KNOB_ROLE_BOTH:
+#if 0
if (fcp->role != ISP_ROLE_BOTH) {
rchange = 1;
newrole = ISP_ROLE_BOTH;
}
+#else
+ /*
+ * We don't really support dual role at present on FC cards.
+ *
+ * We should, but a bunch of things are currently broken,
+ * so don't allow it.
+ */
+ isp_prt(isp, ISP_LOGERR, "cannot support dual role at present");
+ ccb->ccb_h.status = CAM_REQ_INVALID;
+#endif
break;
}
if (rchange) {
@@ -4771,6 +4827,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
char *msg = NULL;
target_id_t tgt;
fcportdb_t *lp;
+ struct isp_fc *fc;
struct cam_path *tmppath;
va_list ap;
@@ -4855,7 +4912,6 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
/* FALLTHROUGH */
case ISPASYNC_LOOP_DOWN:
{
- struct isp_fc *fc;
if (msg == NULL) {
msg = "LOOP Down";
}
@@ -4863,20 +4919,21 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
bus = va_arg(ap, int);
va_end(ap);
- FCPARAM(isp, bus)->link_active = 1;
+ FCPARAM(isp, bus)->link_active = 0;
fc = ISP_FC_PC(isp, bus);
- /*
- * We don't do any simq freezing if we are only in target mode
- */
- if (fc->role & ISP_ROLE_INITIATOR) {
- if (fc->path) {
- isp_freeze_loopdown(isp, bus, msg);
- }
- if (fc->ldt_running == 0) {
- fc->ldt_running = 1;
- callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc);
- isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "starting Loop Down Timer @ %lu", (unsigned long) time_uptime);
+ if (cmd == ISPASYNC_LOOP_DOWN && fc->ready) {
+ /*
+ * We don't do any simq freezing if we are only in target mode
+ */
+ if (fc->role & ISP_ROLE_INITIATOR) {
+ if (fc->path) {
+ isp_freeze_loopdown(isp, bus, msg);
+ }
+ if (!callout_active(&fc->ldt)) {
+ callout_reset(&fc->ldt, fc->loop_down_limit * hz, isp_ldt, fc);
+ isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "starting Loop Down Timer @ %lu", (unsigned long) time_uptime);
+ }
}
}
isp_prt(isp, ISP_LOGINFO, "Chan %d: %s", bus, msg);
@@ -4886,6 +4943,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
va_start(ap, cmd);
bus = va_arg(ap, int);
va_end(ap);
+ fc = ISP_FC_PC(isp, bus);
/*
* Now we just note that Loop has come up. We don't
* actually do anything because we're waiting for a
@@ -4893,8 +4951,8 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
* thread to look at the state of the loop again.
*/
FCPARAM(isp, bus)->link_active = 1;
- ISP_FC_PC(isp, bus)->loop_dead = 0;
- ISP_FC_PC(isp, bus)->loop_down_time = 0;
+ fc->loop_dead = 0;
+ fc->loop_down_time = 0;
isp_prt(isp, ISP_LOGINFO, "Chan %d Loop UP", bus);
break;
case ISPASYNC_DEV_ARRIVED:
@@ -4902,8 +4960,9 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
bus = va_arg(ap, int);
lp = va_arg(ap, fcportdb_t *);
va_end(ap);
+ fc = ISP_FC_PC(isp, bus);
lp->reserved = 0;
- if ((ISP_FC_PC(isp, bus)->role & ISP_ROLE_INITIATOR) && (lp->roles & (SVC3_TGT_ROLE >> SVC3_ROLE_SHIFT))) {
+ if ((fc->role & ISP_ROLE_INITIATOR) && (lp->roles & (SVC3_TGT_ROLE >> SVC3_ROLE_SHIFT))) {
int dbidx = lp - FCPARAM(isp, bus)->portdb;
int i;
@@ -4936,6 +4995,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
bus = va_arg(ap, int);
lp = va_arg(ap, fcportdb_t *);
va_end(ap);
+ fc = ISP_FC_PC(isp, bus);
lp->reserved = 0;
if (isp_change_is_bad) {
lp->state = FC_PORTDB_STATE_NIL;
@@ -4982,6 +5042,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
bus = va_arg(ap, int);
lp = va_arg(ap, fcportdb_t *);
va_end(ap);
+ fc = ISP_FC_PC(isp, bus);
/*
* If this has a virtual target and we haven't marked it
* that we're going to have isp_gdt tell the OS it's gone,
@@ -4994,10 +5055,9 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
lp->reserved = 1;
lp->new_reserved = ISP_FC_PC(isp, bus)->gone_device_time;
lp->state = FC_PORTDB_STATE_ZOMBIE;
- if (ISP_FC_PC(isp, bus)->gdt_running == 0) {
+ if (fc->ready && !callout_active(&fc->gdt)) {
isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Chan %d starting Gone Device Timer", bus);
- ISP_FC_PC(isp, bus)->gdt_running = 1;
- callout_reset(&ISP_FC_PC(isp, bus)->gdt, hz, isp_gdt, ISP_FC_PC(isp, bus));
+ callout_reset(&fc->gdt, hz, isp_gdt, fc);
}
tgt = lp->dev_map_idx - 1;
isp_prt(isp, ISP_LOGCONFIG, prom2, bus, lp->portid, lp->handle, roles[lp->roles], "gone zombie at", tgt, (uint32_t) (lp->port_wwn >> 32), (uint32_t) lp->port_wwn);
@@ -5022,6 +5082,7 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
nlstate = reason = 0;
}
va_end(ap);
+ fc = ISP_FC_PC(isp, bus);
if (evt == ISPASYNC_CHANGE_PDB) {
msg = "Chan %d Port Database Changed";
@@ -5034,16 +5095,15 @@ isp_async(ispsoftc_t *isp, ispasync_t cm
/*
* If the loop down timer is running, cancel it.
*/
- if (ISP_FC_PC(isp, bus)->ldt_running) {
+ if (fc->ready && callout_active(&fc->ldt)) {
isp_prt(isp, ISP_LOGSANCFG|ISP_LOGDEBUG0, "Stopping Loop Down Timer @ %lu", (unsigned long) time_uptime);
- ISP_FC_PC(isp, bus)->ldt_running = 0;
- callout_stop(&ISP_FC_PC(isp, bus)->ldt);
+ callout_stop(&fc->ldt);
}
isp_prt(isp, ISP_LOGINFO, msg, bus);
- if (ISP_FC_PC(isp, bus)->role & ISP_ROLE_INITIATOR) {
+ if (fc->role & ISP_ROLE_INITIATOR) {
isp_freeze_loopdown(isp, bus, msg);
}
- wakeup(ISP_FC_PC(isp, bus));
+ wakeup(fc);
break;
}
#ifdef ISP_TARGET_MODE
Modified: stable/8/sys/dev/isp/isp_freebsd.h
==============================================================================
--- stable/8/sys/dev/isp/isp_freebsd.h Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/isp/isp_freebsd.h Thu Feb 11 18:34:06 2010 (r203786)
@@ -177,9 +177,9 @@ struct isp_fc {
hysteresis : 8,
role : 2,
gdt_running : 1,
- ldt_running : 1,
loop_dead : 1,
- fcbsy : 1;
+ fcbsy : 1,
+ ready : 1;
struct callout ldt; /* loop down timer */
struct callout gdt; /* gone device timer */
#ifdef ISP_TARGET_MODE
Modified: stable/8/sys/dev/isp/isp_library.c
==============================================================================
--- stable/8/sys/dev/isp/isp_library.c Thu Feb 11 18:24:00 2010 (r203785)
+++ stable/8/sys/dev/isp/isp_library.c Thu Feb 11 18:34:06 2010 (r203786)
@@ -246,65 +246,70 @@ copy_and_sync:
}
int
-isp_save_xs(ispsoftc_t *isp, XS_T *xs, uint32_t *handlep)
+isp_allocate_xs(ispsoftc_t *isp, XS_T *xs, uint32_t *handlep)
{
- uint16_t i, j;
+ isp_hdl_t *hdp;
- for (j = isp->isp_lasthdls, i = 0; i < isp->isp_maxcmds; i++) {
- if (isp->isp_xflist[j] == NULL) {
- break;
- }
- if (++j == isp->isp_maxcmds) {
- j = 0;
- }
- }
- if (i == isp->isp_maxcmds) {
+ hdp = isp->isp_xffree;
+ if (hdp == NULL) {
return (-1);
}
*** DIFF OUTPUT TRUNCATED AT 1000 LINES ***
More information about the svn-src-stable-8
mailing list