tws.c (416ba5c74546f32a993436a99516d35008e9f384) tws.c (43cd61606b6bfae52bb09856277751103bfa28fd)
1/*
2 * Copyright (c) 2010, LSI Corp.
3 * All rights reserved.
4 * Author : Manjunath Ranganathaiah
5 * Support: freebsdraid@lsi.com
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 231 unchanged lines hidden (view full) ---

240#ifndef TWS_PULL_MODE_ENABLE
241 sc->mfa_base = (u_int64_t)pci_read_config(dev, TWS_PCI_BAR2, 4);
242 sc->mfa_base = sc->mfa_base & ~TWS_BIT2;
243 TWS_TRACE_DEBUG(sc, "bar2 ", sc->mfa_base, 0);
244#endif
245
246 /* allocate MMIO register space */
247 sc->reg_res_id = TWS_PCI_BAR1; /* BAR1 offset */
1/*
2 * Copyright (c) 2010, LSI Corp.
3 * All rights reserved.
4 * Author : Manjunath Ranganathaiah
5 * Support: freebsdraid@lsi.com
6 *
7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions

--- 231 unchanged lines hidden (view full) ---

240#ifndef TWS_PULL_MODE_ENABLE
241 sc->mfa_base = (u_int64_t)pci_read_config(dev, TWS_PCI_BAR2, 4);
242 sc->mfa_base = sc->mfa_base & ~TWS_BIT2;
243 TWS_TRACE_DEBUG(sc, "bar2 ", sc->mfa_base, 0);
244#endif
245
246 /* allocate MMIO register space */
247 sc->reg_res_id = TWS_PCI_BAR1; /* BAR1 offset */
248 if ((sc->reg_res = bus_alloc_resource(dev, SYS_RES_MEMORY,
249 &(sc->reg_res_id), 0, ~0, 1, RF_ACTIVE))
248 if ((sc->reg_res = bus_alloc_resource_any(dev, SYS_RES_MEMORY,
249 &(sc->reg_res_id), RF_ACTIVE))
250 == NULL) {
251 tws_log(sc, ALLOC_MEMORY_RES);
252 goto attach_fail_1;
253 }
254 sc->bus_tag = rman_get_bustag(sc->reg_res);
255 sc->bus_handle = rman_get_bushandle(sc->reg_res);
256
257#ifndef TWS_PULL_MODE_ENABLE

--- 665 unchanged lines hidden ---
250 == NULL) {
251 tws_log(sc, ALLOC_MEMORY_RES);
252 goto attach_fail_1;
253 }
254 sc->bus_tag = rman_get_bustag(sc->reg_res);
255 sc->bus_handle = rman_get_bushandle(sc->reg_res);
256
257#ifndef TWS_PULL_MODE_ENABLE

--- 665 unchanged lines hidden ---