@@ -1424,97 +1424,96 @@ static inline char *pci_alloc_consistent_esx(struct pci_dev *pdev, size_t size,
pfn = range.startMPN;
#endif /* (VMWARE_ESX_DDK_VERSION != 41000) */
virt_mem = page_to_virt(pfn_to_page(pfn));
memset(virt_mem, 0, size);
*mapping = pci_map_single(pdev, virt_mem, size, PCI_DMA_BIDIRECTIONAL);
return virt_mem;
}
static inline void pci_free_consistent_esx(struct pci_dev *pdev, size_t size,
void *virt, dma_addr_t mapping)
{
#if (VMWARE_ESX_DDK_VERSION == 41000)
vmk_MachPage pfn;
#else
vmk_MpnRange range;
vmk_MemPoolAllocRequest alloc_request;
#endif
struct bnx2i_hba *hba = bnx2i_map_pcidev_to_hba(pdev);
if (!hba) {
printk("pci_free_consistent_esx: could not find the hba associated with the dma mapping to free.\n");
return;
pci_unmap_single(pdev, mapping, size, PCI_DMA_BIDIRECTIONAL);
pfn = virt_to_page(virt);
vmk_MemPoolFree(&pfn);
range.startMPN = virt_to_page(virt);
range.numPages = 1 << get_order(size);
alloc_request.mpnRanges = ⦥
alloc_request.numPages = range.numPages;
alloc_request.numElements = 1;
vmk_MemPoolFree(&alloc_request);
#endif /* (VMWARE_ESX_DDK_VERSION == 41000) */
#if (VMWARE_ESX_DDK_VERSION >= 60000)
static inline void bnx2i_int_to_scsilun_with_sec_lun_id(uint16_t lun,
struct scsi_lun *scsi_lun,
uint64_t sllid)
if (sllid != VMKLNX_SCSI_INVALID_SECONDLEVEL_ID) {
VMK_ASSERT(lun <= 255); /* Max LUN supported is 255. */
memset(scsi_lun, 0, 8);
scsi_lun->scsi_lun[0] = (lun >> 8) & 0xFF;
scsi_lun->scsi_lun[1] = lun & 0xFF;
scsi_lun->scsi_lun[2] = (uint8_t)((sllid >> 56) & 0xFF); /* sllid msb */
scsi_lun->scsi_lun[3] = (uint8_t)((sllid >> 48) & 0xFF);
scsi_lun->scsi_lun[4] = (uint8_t)((sllid >> 40) & 0xFF);
scsi_lun->scsi_lun[5] = (uint8_t)((sllid >> 32) & 0xFF);
scsi_lun->scsi_lun[6] = (uint8_t)((sllid >> 24) & 0xFF);
scsi_lun->scsi_lun[7] = (uint8_t)((sllid >> 16) & 0xFF); /* sllid lsb */
} else {
int_to_scsilun(lun, scsi_lun);
#endif /* (VMWARE_ESX_DDK_VERSION >= 60000) */
#endif /* __VMKLNX__ */
extern unsigned int cmd_cmpl_per_work;
extern unsigned int max_bnx2x_sessions;
extern unsigned int max_bnx2_sessions;
#ifdef __VMKLNX__
extern int bnx2i_max_sectors;
/*
* Function Prototypes
*/
extern int bnx2i_reg_device;
void bnx2i_identify_device(struct bnx2i_hba *hba, struct cnic_dev *dev);
void bnx2i_register_device(struct bnx2i_hba *hba, int force);
void bnx2i_check_nx2_dev_busy(void);
void bnx2i_get_link_state(struct bnx2i_hba *hba);
void bnx2i_ep_disconnect(vmk_int64 ep_handle);
struct bnx2i_hba *bnx2i_map_netdev_to_hba(struct net_device *netdev);
void bnx2i_ep_disconnect(uint64_t ep_handle);
void bnx2i_ulp_init(struct cnic_dev *dev);
void bnx2i_ulp_exit(struct cnic_dev *dev);
void bnx2i_start(void *handle);
void bnx2i_stop(void *handle);
void bnx2i_reg_dev_all(void);
void bnx2i_unreg_dev_all(void);
struct bnx2i_hba *get_adapter_list_head(void);
void bnx2i_add_hba_to_adapter_list(struct bnx2i_hba *hba);
void bnx2i_remove_hba_from_adapter_list(struct bnx2i_hba *hba);