aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/s390/scsi/zfcp_fsf.c
diff options
context:
space:
mode:
authorSwen Schillig <swen@vnet.ibm.com>2008-10-01 06:42:16 -0400
committerJames Bottomley <James.Bottomley@HansenPartnership.com>2008-10-03 13:11:52 -0400
commit44cc76f2d154aa24340354b4711a0fe7f8f08adc (patch)
tree0b32bb89450b12262b4bf78fc4cd297e8db0b77b /drivers/s390/scsi/zfcp_fsf.c
parentff3b24fa5370a7ca618f212284d9b36fcedb9c0e (diff)
[SCSI] zfcp: remove unused references, declarations and flags
- Remove unused references and declarations, including one instance of the FC ls_adisc struct that has been defined twice. - Also remove the flags COMMON_OPENING, COMMON_CLOSING, ADAPTER_REGISTERED and XPORT_OK that are only set and cleared, but not checked anywhere. - Remove the zfcp specific atomic_test_mask makro. Simply use atomic_read directly instead. - Remove the zfcp internal sg helper functions and switch the places where it is still used to call sg_virt directly. - With the update of the QDIO code, the QDIO data structures no longer use the volatile type qualifier. Now we can also remove the volatile qualifiers from the zfcp code. Signed-off-by: Swen Schillig <swen@vnet.ibm.com> Signed-off-by: Christof Schmitt <christof.schmitt@de.ibm.com> Signed-off-by: James Bottomley <James.Bottomley@HansenPartnership.com>
Diffstat (limited to 'drivers/s390/scsi/zfcp_fsf.c')
-rw-r--r--drivers/s390/scsi/zfcp_fsf.c59
1 files changed, 20 insertions, 39 deletions
diff --git a/drivers/s390/scsi/zfcp_fsf.c b/drivers/s390/scsi/zfcp_fsf.c
index 489a1896499..af75fd2ef1e 100644
--- a/drivers/s390/scsi/zfcp_fsf.c
+++ b/drivers/s390/scsi/zfcp_fsf.c
@@ -621,7 +621,6 @@ static void zfcp_fsf_exchange_port_evaluate(struct zfcp_fsf_req *req)
621 621
622static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req) 622static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
623{ 623{
624 struct zfcp_adapter *adapter = req->adapter;
625 struct fsf_qtcb *qtcb = req->qtcb; 624 struct fsf_qtcb *qtcb = req->qtcb;
626 625
627 if (req->status & ZFCP_STATUS_FSFREQ_ERROR) 626 if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
@@ -630,11 +629,9 @@ static void zfcp_fsf_exchange_port_data_handler(struct zfcp_fsf_req *req)
630 switch (qtcb->header.fsf_status) { 629 switch (qtcb->header.fsf_status) {
631 case FSF_GOOD: 630 case FSF_GOOD:
632 zfcp_fsf_exchange_port_evaluate(req); 631 zfcp_fsf_exchange_port_evaluate(req);
633 atomic_set_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status);
634 break; 632 break;
635 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE: 633 case FSF_EXCHANGE_CONFIG_DATA_INCOMPLETE:
636 zfcp_fsf_exchange_port_evaluate(req); 634 zfcp_fsf_exchange_port_evaluate(req);
637 atomic_set_mask(ZFCP_STATUS_ADAPTER_XPORT_OK, &adapter->status);
638 zfcp_fsf_link_down_info_eval(req, 43, 635 zfcp_fsf_link_down_info_eval(req, 43,
639 &qtcb->header.fsf_status_qual.link_down_info); 636 &qtcb->header.fsf_status_qual.link_down_info);
640 break; 637 break;
@@ -708,7 +705,7 @@ static struct zfcp_fsf_req *zfcp_fsf_req_create(struct zfcp_adapter *adapter,
708 u32 fsf_cmd, int req_flags, 705 u32 fsf_cmd, int req_flags,
709 mempool_t *pool) 706 mempool_t *pool)
710{ 707{
711 volatile struct qdio_buffer_element *sbale; 708 struct qdio_buffer_element *sbale;
712 709
713 struct zfcp_fsf_req *req; 710 struct zfcp_fsf_req *req;
714 struct zfcp_qdio_queue *req_q = &adapter->req_q; 711 struct zfcp_qdio_queue *req_q = &adapter->req_q;
@@ -810,7 +807,7 @@ int zfcp_fsf_status_read(struct zfcp_adapter *adapter)
810{ 807{
811 struct zfcp_fsf_req *req; 808 struct zfcp_fsf_req *req;
812 struct fsf_status_read_buffer *sr_buf; 809 struct fsf_status_read_buffer *sr_buf;
813 volatile struct qdio_buffer_element *sbale; 810 struct qdio_buffer_element *sbale;
814 int retval = -EIO; 811 int retval = -EIO;
815 812
816 spin_lock_bh(&adapter->req_q.lock); 813 spin_lock_bh(&adapter->req_q.lock);
@@ -923,7 +920,7 @@ struct zfcp_fsf_req *zfcp_fsf_abort_fcp_command(unsigned long old_req_id,
923 struct zfcp_unit *unit, 920 struct zfcp_unit *unit,
924 int req_flags) 921 int req_flags)
925{ 922{
926 volatile struct qdio_buffer_element *sbale; 923 struct qdio_buffer_element *sbale;
927 struct zfcp_fsf_req *req = NULL; 924 struct zfcp_fsf_req *req = NULL;
928 925
929 spin_lock(&adapter->req_q.lock); 926 spin_lock(&adapter->req_q.lock);
@@ -1171,8 +1168,8 @@ int zfcp_fsf_send_els(struct zfcp_send_els *els)
1171 goto out; 1168 goto out;
1172 } 1169 }
1173 1170
1174 ret = zfcp_fsf_setup_sbals(req, els->req, els->resp, 1171 ret = zfcp_fsf_setup_sbals(req, els->req, els->resp, 2);
1175 FSF_MAX_SBALS_PER_ELS_REQ); 1172
1176 if (ret) 1173 if (ret)
1177 goto failed_send; 1174 goto failed_send;
1178 1175
@@ -1201,7 +1198,7 @@ out:
1201 1198
1202int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action) 1199int zfcp_fsf_exchange_config_data(struct zfcp_erp_action *erp_action)
1203{ 1200{
1204 volatile struct qdio_buffer_element *sbale; 1201 struct qdio_buffer_element *sbale;
1205 struct zfcp_fsf_req *req; 1202 struct zfcp_fsf_req *req;
1206 struct zfcp_adapter *adapter = erp_action->adapter; 1203 struct zfcp_adapter *adapter = erp_action->adapter;
1207 int retval = -EIO; 1204 int retval = -EIO;
@@ -1245,7 +1242,7 @@ out:
1245int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter, 1242int zfcp_fsf_exchange_config_data_sync(struct zfcp_adapter *adapter,
1246 struct fsf_qtcb_bottom_config *data) 1243 struct fsf_qtcb_bottom_config *data)
1247{ 1244{
1248 volatile struct qdio_buffer_element *sbale; 1245 struct qdio_buffer_element *sbale;
1249 struct zfcp_fsf_req *req = NULL; 1246 struct zfcp_fsf_req *req = NULL;
1250 int retval = -EIO; 1247 int retval = -EIO;
1251 1248
@@ -1294,7 +1291,7 @@ out:
1294 */ 1291 */
1295int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action) 1292int zfcp_fsf_exchange_port_data(struct zfcp_erp_action *erp_action)
1296{ 1293{
1297 volatile struct qdio_buffer_element *sbale; 1294 struct qdio_buffer_element *sbale;
1298 struct zfcp_fsf_req *req; 1295 struct zfcp_fsf_req *req;
1299 struct zfcp_adapter *adapter = erp_action->adapter; 1296 struct zfcp_adapter *adapter = erp_action->adapter;
1300 int retval = -EIO; 1297 int retval = -EIO;
@@ -1341,7 +1338,7 @@ out:
1341int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter, 1338int zfcp_fsf_exchange_port_data_sync(struct zfcp_adapter *adapter,
1342 struct fsf_qtcb_bottom_port *data) 1339 struct fsf_qtcb_bottom_port *data)
1343{ 1340{
1344 volatile struct qdio_buffer_element *sbale; 1341 struct qdio_buffer_element *sbale;
1345 struct zfcp_fsf_req *req = NULL; 1342 struct zfcp_fsf_req *req = NULL;
1346 int retval = -EIO; 1343 int retval = -EIO;
1347 1344
@@ -1386,7 +1383,7 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
1386 struct fsf_plogi *plogi; 1383 struct fsf_plogi *plogi;
1387 1384
1388 if (req->status & ZFCP_STATUS_FSFREQ_ERROR) 1385 if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
1389 goto skip_fsfstatus; 1386 return;
1390 1387
1391 switch (header->fsf_status) { 1388 switch (header->fsf_status) {
1392 case FSF_PORT_ALREADY_OPEN: 1389 case FSF_PORT_ALREADY_OPEN:
@@ -1456,9 +1453,6 @@ static void zfcp_fsf_open_port_handler(struct zfcp_fsf_req *req)
1456 req->status |= ZFCP_STATUS_FSFREQ_ERROR; 1453 req->status |= ZFCP_STATUS_FSFREQ_ERROR;
1457 break; 1454 break;
1458 } 1455 }
1459
1460skip_fsfstatus:
1461 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING, &port->status);
1462} 1456}
1463 1457
1464/** 1458/**
@@ -1468,7 +1462,7 @@ skip_fsfstatus:
1468 */ 1462 */
1469int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action) 1463int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
1470{ 1464{
1471 volatile struct qdio_buffer_element *sbale; 1465 struct qdio_buffer_element *sbale;
1472 struct zfcp_adapter *adapter = erp_action->adapter; 1466 struct zfcp_adapter *adapter = erp_action->adapter;
1473 struct zfcp_fsf_req *req; 1467 struct zfcp_fsf_req *req;
1474 int retval = -EIO; 1468 int retval = -EIO;
@@ -1495,7 +1489,6 @@ int zfcp_fsf_open_port(struct zfcp_erp_action *erp_action)
1495 req->data = erp_action->port; 1489 req->data = erp_action->port;
1496 req->erp_action = erp_action; 1490 req->erp_action = erp_action;
1497 erp_action->fsf_req = req; 1491 erp_action->fsf_req = req;
1498 atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->port->status);
1499 1492
1500 zfcp_fsf_start_erp_timer(req); 1493 zfcp_fsf_start_erp_timer(req);
1501 retval = zfcp_fsf_req_send(req); 1494 retval = zfcp_fsf_req_send(req);
@@ -1513,7 +1506,7 @@ static void zfcp_fsf_close_port_handler(struct zfcp_fsf_req *req)
1513 struct zfcp_port *port = req->data; 1506 struct zfcp_port *port = req->data;
1514 1507
1515 if (req->status & ZFCP_STATUS_FSFREQ_ERROR) 1508 if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
1516 goto skip_fsfstatus; 1509 return;
1517 1510
1518 switch (req->qtcb->header.fsf_status) { 1511 switch (req->qtcb->header.fsf_status) {
1519 case FSF_PORT_HANDLE_NOT_VALID: 1512 case FSF_PORT_HANDLE_NOT_VALID:
@@ -1528,9 +1521,6 @@ static void zfcp_fsf_close_port_handler(struct zfcp_fsf_req *req)
1528 ZFCP_CLEAR); 1521 ZFCP_CLEAR);
1529 break; 1522 break;
1530 } 1523 }
1531
1532skip_fsfstatus:
1533 atomic_clear_mask(ZFCP_STATUS_COMMON_CLOSING, &port->status);
1534} 1524}
1535 1525
1536/** 1526/**
@@ -1540,7 +1530,7 @@ skip_fsfstatus:
1540 */ 1530 */
1541int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action) 1531int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
1542{ 1532{
1543 volatile struct qdio_buffer_element *sbale; 1533 struct qdio_buffer_element *sbale;
1544 struct zfcp_adapter *adapter = erp_action->adapter; 1534 struct zfcp_adapter *adapter = erp_action->adapter;
1545 struct zfcp_fsf_req *req; 1535 struct zfcp_fsf_req *req;
1546 int retval = -EIO; 1536 int retval = -EIO;
@@ -1566,7 +1556,6 @@ int zfcp_fsf_close_port(struct zfcp_erp_action *erp_action)
1566 req->erp_action = erp_action; 1556 req->erp_action = erp_action;
1567 req->qtcb->header.port_handle = erp_action->port->handle; 1557 req->qtcb->header.port_handle = erp_action->port->handle;
1568 erp_action->fsf_req = req; 1558 erp_action->fsf_req = req;
1569 atomic_set_mask(ZFCP_STATUS_COMMON_CLOSING, &erp_action->port->status);
1570 1559
1571 zfcp_fsf_start_erp_timer(req); 1560 zfcp_fsf_start_erp_timer(req);
1572 retval = zfcp_fsf_req_send(req); 1561 retval = zfcp_fsf_req_send(req);
@@ -1637,7 +1626,7 @@ skip_fsfstatus:
1637 */ 1626 */
1638int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action) 1627int zfcp_fsf_close_physical_port(struct zfcp_erp_action *erp_action)
1639{ 1628{
1640 volatile struct qdio_buffer_element *sbale; 1629 struct qdio_buffer_element *sbale;
1641 struct zfcp_adapter *adapter = erp_action->adapter; 1630 struct zfcp_adapter *adapter = erp_action->adapter;
1642 struct zfcp_fsf_req *req; 1631 struct zfcp_fsf_req *req;
1643 int retval = -EIO; 1632 int retval = -EIO;
@@ -1688,7 +1677,7 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1688 int exclusive, readwrite; 1677 int exclusive, readwrite;
1689 1678
1690 if (req->status & ZFCP_STATUS_FSFREQ_ERROR) 1679 if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
1691 goto skip_fsfstatus; 1680 return;
1692 1681
1693 atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED | 1682 atomic_clear_mask(ZFCP_STATUS_COMMON_ACCESS_DENIED |
1694 ZFCP_STATUS_COMMON_ACCESS_BOXED | 1683 ZFCP_STATUS_COMMON_ACCESS_BOXED |
@@ -1798,9 +1787,6 @@ static void zfcp_fsf_open_unit_handler(struct zfcp_fsf_req *req)
1798 } 1787 }
1799 break; 1788 break;
1800 } 1789 }
1801
1802skip_fsfstatus:
1803 atomic_clear_mask(ZFCP_STATUS_COMMON_OPENING, &unit->status);
1804} 1790}
1805 1791
1806/** 1792/**
@@ -1810,7 +1796,7 @@ skip_fsfstatus:
1810 */ 1796 */
1811int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action) 1797int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
1812{ 1798{
1813 volatile struct qdio_buffer_element *sbale; 1799 struct qdio_buffer_element *sbale;
1814 struct zfcp_adapter *adapter = erp_action->adapter; 1800 struct zfcp_adapter *adapter = erp_action->adapter;
1815 struct zfcp_fsf_req *req; 1801 struct zfcp_fsf_req *req;
1816 int retval = -EIO; 1802 int retval = -EIO;
@@ -1841,8 +1827,6 @@ int zfcp_fsf_open_unit(struct zfcp_erp_action *erp_action)
1841 if (!(adapter->connection_features & FSF_FEATURE_NPIV_MODE)) 1827 if (!(adapter->connection_features & FSF_FEATURE_NPIV_MODE))
1842 req->qtcb->bottom.support.option = FSF_OPEN_LUN_SUPPRESS_BOXING; 1828 req->qtcb->bottom.support.option = FSF_OPEN_LUN_SUPPRESS_BOXING;
1843 1829
1844 atomic_set_mask(ZFCP_STATUS_COMMON_OPENING, &erp_action->unit->status);
1845
1846 zfcp_fsf_start_erp_timer(req); 1830 zfcp_fsf_start_erp_timer(req);
1847 retval = zfcp_fsf_req_send(req); 1831 retval = zfcp_fsf_req_send(req);
1848 if (retval) { 1832 if (retval) {
@@ -1859,7 +1843,7 @@ static void zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *req)
1859 struct zfcp_unit *unit = req->data; 1843 struct zfcp_unit *unit = req->data;
1860 1844
1861 if (req->status & ZFCP_STATUS_FSFREQ_ERROR) 1845 if (req->status & ZFCP_STATUS_FSFREQ_ERROR)
1862 goto skip_fsfstatus; 1846 return;
1863 1847
1864 switch (req->qtcb->header.fsf_status) { 1848 switch (req->qtcb->header.fsf_status) {
1865 case FSF_PORT_HANDLE_NOT_VALID: 1849 case FSF_PORT_HANDLE_NOT_VALID:
@@ -1889,8 +1873,6 @@ static void zfcp_fsf_close_unit_handler(struct zfcp_fsf_req *req)
1889 atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status); 1873 atomic_clear_mask(ZFCP_STATUS_COMMON_OPEN, &unit->status);
1890 break; 1874 break;
1891 } 1875 }
1892skip_fsfstatus:
1893 atomic_clear_mask(ZFCP_STATUS_COMMON_CLOSING, &unit->status);
1894} 1876}
1895 1877
1896/** 1878/**
@@ -1900,7 +1882,7 @@ skip_fsfstatus:
1900 */ 1882 */
1901int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action) 1883int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
1902{ 1884{
1903 volatile struct qdio_buffer_element *sbale; 1885 struct qdio_buffer_element *sbale;
1904 struct zfcp_adapter *adapter = erp_action->adapter; 1886 struct zfcp_adapter *adapter = erp_action->adapter;
1905 struct zfcp_fsf_req *req; 1887 struct zfcp_fsf_req *req;
1906 int retval = -EIO; 1888 int retval = -EIO;
@@ -1926,7 +1908,6 @@ int zfcp_fsf_close_unit(struct zfcp_erp_action *erp_action)
1926 req->data = erp_action->unit; 1908 req->data = erp_action->unit;
1927 req->erp_action = erp_action; 1909 req->erp_action = erp_action;
1928 erp_action->fsf_req = req; 1910 erp_action->fsf_req = req;
1929 atomic_set_mask(ZFCP_STATUS_COMMON_CLOSING, &erp_action->unit->status);
1930 1911
1931 zfcp_fsf_start_erp_timer(req); 1912 zfcp_fsf_start_erp_timer(req);
1932 retval = zfcp_fsf_req_send(req); 1913 retval = zfcp_fsf_req_send(req);
@@ -2275,7 +2256,7 @@ struct zfcp_fsf_req *zfcp_fsf_send_fcp_ctm(struct zfcp_adapter *adapter,
2275 struct zfcp_unit *unit, 2256 struct zfcp_unit *unit,
2276 u8 tm_flags, int req_flags) 2257 u8 tm_flags, int req_flags)
2277{ 2258{
2278 volatile struct qdio_buffer_element *sbale; 2259 struct qdio_buffer_element *sbale;
2279 struct zfcp_fsf_req *req = NULL; 2260 struct zfcp_fsf_req *req = NULL;
2280 struct fcp_cmnd_iu *fcp_cmnd_iu; 2261 struct fcp_cmnd_iu *fcp_cmnd_iu;
2281 2262
@@ -2335,7 +2316,7 @@ static void zfcp_fsf_control_file_handler(struct zfcp_fsf_req *req)
2335struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter, 2316struct zfcp_fsf_req *zfcp_fsf_control_file(struct zfcp_adapter *adapter,
2336 struct zfcp_fsf_cfdc *fsf_cfdc) 2317 struct zfcp_fsf_cfdc *fsf_cfdc)
2337{ 2318{
2338 volatile struct qdio_buffer_element *sbale; 2319 struct qdio_buffer_element *sbale;
2339 struct zfcp_fsf_req *req = NULL; 2320 struct zfcp_fsf_req *req = NULL;
2340 struct fsf_qtcb_bottom_support *bottom; 2321 struct fsf_qtcb_bottom_support *bottom;
2341 int direction, retval = -EIO, bytes; 2322 int direction, retval = -EIO, bytes;