diff options
author | mjacob <mjacob@FreeBSD.org> | 2012-08-12 20:45:47 +0000 |
---|---|---|
committer | mjacob <mjacob@FreeBSD.org> | 2012-08-12 20:45:47 +0000 |
commit | c0bff9b6e5d0690b03c9578877a3823329933f2f (patch) | |
tree | dfd478a66cf4863f18253026e820d0b0ac26cc30 /sys/dev/isp/isp_pci.c | |
parent | c31cc6a5eeec8f83ce350a7a7b607ae8230a339c (diff) | |
download | FreeBSD-src-c0bff9b6e5d0690b03c9578877a3823329933f2f.zip FreeBSD-src-c0bff9b6e5d0690b03c9578877a3823329933f2f.tar.gz |
Fix an oops where we wiped out DMA maps. Don't allocate extended
command space for anything less than a 2300.
MFC after: 1 month
X-MFC: 238869
Diffstat (limited to 'sys/dev/isp/isp_pci.c')
-rw-r--r-- | sys/dev/isp/isp_pci.c | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/sys/dev/isp/isp_pci.c b/sys/dev/isp/isp_pci.c index d4a214b..853856a 100644 --- a/sys/dev/isp/isp_pci.c +++ b/sys/dev/isp/isp_pci.c @@ -1690,18 +1690,20 @@ isp_pci_mbxdma(ispsoftc_t *isp) bus_dma_tag_destroy(fc->tdmat); goto bad; } - for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { - struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); - if (n == NULL) { - while (fc->nexus_free_list) { - n = fc->nexus_free_list; - fc->nexus_free_list = n->next; - free(n, M_DEVBUF); + if (isp->isp_type >= ISP_HA_FC_2300) { + for (i = 0; i < INITIAL_NEXUS_COUNT; i++) { + struct isp_nexus *n = malloc(sizeof (struct isp_nexus), M_DEVBUF, M_NOWAIT | M_ZERO); + if (n == NULL) { + while (fc->nexus_free_list) { + n = fc->nexus_free_list; + fc->nexus_free_list = n->next; + free(n, M_DEVBUF); + } + goto bad; } - goto bad; + n->next = fc->nexus_free_list; + fc->nexus_free_list = n; } - n->next = fc->nexus_free_list; - fc->nexus_free_list = n; } } } |