Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Merge git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6

* git://git.kernel.org/pub/scm/linux/kernel/git/jejb/scsi-rc-fixes-2.6:
[SCSI] ibmvscsi: Fix oops when an interrupt is pending during probe
[SCSI] zfcp: Update status read mempool
[SCSI] zfcp: Do not wait for SBALs on stopped queue
[SCSI] zfcp: Fix check whether unchained ct_els is possible
[SCSI] ipr: fix resource path display and formatting

+63 -34
+8
drivers/s390/scsi/zfcp_erp.c
··· 714 714 if (zfcp_erp_adapter_strategy_open_fsf_xport(act) == ZFCP_ERP_FAILED) 715 715 return ZFCP_ERP_FAILED; 716 716 717 + if (mempool_resize(act->adapter->pool.status_read_data, 718 + act->adapter->stat_read_buf_num, GFP_KERNEL)) 719 + return ZFCP_ERP_FAILED; 720 + 721 + if (mempool_resize(act->adapter->pool.status_read_req, 722 + act->adapter->stat_read_buf_num, GFP_KERNEL)) 723 + return ZFCP_ERP_FAILED; 724 + 717 725 atomic_set(&act->adapter->stat_miss, act->adapter->stat_read_buf_num); 718 726 if (zfcp_status_read_refill(act->adapter)) 719 727 return ZFCP_ERP_FAILED;
+3 -7
drivers/s390/scsi/zfcp_fsf.c
··· 496 496 497 497 adapter->hydra_version = bottom->adapter_type; 498 498 adapter->timer_ticks = bottom->timer_interval; 499 - adapter->stat_read_buf_num = max(bottom->status_read_buf_num, (u16)16); 499 + adapter->stat_read_buf_num = max(bottom->status_read_buf_num, 500 + (u16)FSF_STATUS_READS_RECOM); 500 501 501 502 if (fc_host_permanent_port_name(shost) == -1) 502 503 fc_host_permanent_port_name(shost) = fc_host_port_name(shost); ··· 719 718 720 719 zfcp_qdio_req_init(adapter->qdio, &req->qdio_req, req->req_id, sbtype, 721 720 req->qtcb, sizeof(struct fsf_qtcb)); 722 - 723 - if (!(atomic_read(&adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) { 724 - zfcp_fsf_req_free(req); 725 - return ERR_PTR(-EIO); 726 - } 727 721 728 722 return req; 729 723 } ··· 977 981 } 978 982 979 983 /* use single, unchained SBAL if it can hold the request */ 980 - if (zfcp_qdio_sg_one_sbale(sg_req) || zfcp_qdio_sg_one_sbale(sg_resp)) { 984 + if (zfcp_qdio_sg_one_sbale(sg_req) && zfcp_qdio_sg_one_sbale(sg_resp)) { 981 985 zfcp_fsf_setup_ct_els_unchained(adapter->qdio, &req->qdio_req, 982 986 sg_req, sg_resp); 983 987 return 0;
+9 -1
drivers/s390/scsi/zfcp_qdio.c
··· 251 251 struct zfcp_qdio_queue *req_q = &qdio->req_q; 252 252 253 253 spin_lock_bh(&qdio->req_q_lock); 254 - if (atomic_read(&req_q->count)) 254 + if (atomic_read(&req_q->count) || 255 + !(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) 255 256 return 1; 256 257 spin_unlock_bh(&qdio->req_q_lock); 257 258 return 0; ··· 275 274 spin_unlock_bh(&qdio->req_q_lock); 276 275 ret = wait_event_interruptible_timeout(qdio->req_q_wq, 277 276 zfcp_qdio_sbal_check(qdio), 5 * HZ); 277 + 278 + if (!(atomic_read(&qdio->adapter->status) & ZFCP_STATUS_ADAPTER_QDIOUP)) 279 + return -EIO; 280 + 278 281 if (ret > 0) 279 282 return 0; 283 + 280 284 if (!ret) { 281 285 atomic_inc(&qdio->req_q_full); 282 286 /* assume hanging outbound queue, try queue recovery */ ··· 380 374 spin_lock_bh(&qdio->req_q_lock); 381 375 atomic_clear_mask(ZFCP_STATUS_ADAPTER_QDIOUP, &qdio->adapter->status); 382 376 spin_unlock_bh(&qdio->req_q_lock); 377 + 378 + wake_up(&qdio->req_q_wq); 383 379 384 380 qdio_shutdown(qdio->adapter->ccw_device, 385 381 QDIO_FLAG_CLEANUP_USING_CLEAR);
+7 -6
drivers/scsi/ibmvscsi/rpa_vscsi.c
··· 277 277 goto reg_crq_failed; 278 278 } 279 279 280 + queue->cur = 0; 281 + spin_lock_init(&queue->lock); 282 + 283 + tasklet_init(&hostdata->srp_task, (void *)rpavscsi_task, 284 + (unsigned long)hostdata); 285 + 280 286 if (request_irq(vdev->irq, 281 287 rpavscsi_handle_event, 282 288 0, "ibmvscsi", (void *)hostdata) != 0) { ··· 297 291 goto req_irq_failed; 298 292 } 299 293 300 - queue->cur = 0; 301 - spin_lock_init(&queue->lock); 302 - 303 - tasklet_init(&hostdata->srp_task, (void *)rpavscsi_task, 304 - (unsigned long)hostdata); 305 - 306 294 return retrc; 307 295 308 296 req_irq_failed: 297 + tasklet_kill(&hostdata->srp_task); 309 298 do { 310 299 rc = plpar_hcall_norets(H_FREE_CRQ, vdev->unit_address); 311 300 } while ((rc == H_BUSY) || (H_IS_LONG_BUSY(rc)));
+33 -18
drivers/scsi/ipr.c
··· 1129 1129 } 1130 1130 1131 1131 /** 1132 - * ipr_format_resource_path - Format the resource path for printing. 1132 + * ipr_format_res_path - Format the resource path for printing. 1133 1133 * @res_path: resource path 1134 1134 * @buf: buffer 1135 1135 * 1136 1136 * Return value: 1137 1137 * pointer to buffer 1138 1138 **/ 1139 - static char *ipr_format_resource_path(u8 *res_path, char *buffer) 1139 + static char *ipr_format_res_path(u8 *res_path, char *buffer, int len) 1140 1140 { 1141 1141 int i; 1142 + char *p = buffer; 1142 1143 1143 - sprintf(buffer, "%02X", res_path[0]); 1144 - for (i=1; res_path[i] != 0xff; i++) 1145 - sprintf(buffer, "%s-%02X", buffer, res_path[i]); 1144 + res_path[0] = '\0'; 1145 + p += snprintf(p, buffer + len - p, "%02X", res_path[0]); 1146 + for (i = 1; res_path[i] != 0xff && ((i * 3) < len); i++) 1147 + p += snprintf(p, buffer + len - p, "-%02X", res_path[i]); 1146 1148 1147 1149 return buffer; 1148 1150 } ··· 1189 1187 1190 1188 if (res->sdev && new_path) 1191 1189 sdev_printk(KERN_INFO, res->sdev, "Resource path: %s\n", 1192 - ipr_format_resource_path(&res->res_path[0], &buffer[0])); 1190 + ipr_format_res_path(res->res_path, buffer, 1191 + sizeof(buffer))); 1193 1192 } else { 1194 1193 res->flags = cfgtew->u.cfgte->flags; 1195 1194 if (res->flags & IPR_IS_IOA_RESOURCE) ··· 1576 1573 ipr_err_separator; 1577 1574 1578 1575 ipr_err("Device %d : %s", i + 1, 1579 - ipr_format_resource_path(&dev_entry->res_path[0], &buffer[0])); 1576 + ipr_format_res_path(dev_entry->res_path, buffer, 1577 + sizeof(buffer))); 1580 1578 ipr_log_ext_vpd(&dev_entry->vpd); 1581 1579 1582 1580 ipr_err("-----New Device Information-----\n"); ··· 1923 1919 1924 1920 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s\n", 1925 1921 path_active_desc[i].desc, path_state_desc[j].desc, 1926 - ipr_format_resource_path(&fabric->res_path[0], &buffer[0])); 1922 + ipr_format_res_path(fabric->res_path, buffer, 1923 + sizeof(buffer))); 1927 1924 return; 1928 1925 } 1929 1926 } 1930 1927 1931 1928 ipr_err("Path state=%02X Resource Path=%s\n", path_state, 1932 - ipr_format_resource_path(&fabric->res_path[0], &buffer[0])); 1929 + ipr_format_res_path(fabric->res_path, buffer, sizeof(buffer))); 1933 1930 } 1934 1931 1935 1932 static const struct { ··· 2071 2066 2072 2067 ipr_hcam_err(hostrcb, "%s %s: Resource Path=%s, Link rate=%s, WWN=%08X%08X\n", 2073 2068 path_status_desc[j].desc, path_type_desc[i].desc, 2074 - ipr_format_resource_path(&cfg->res_path[0], &buffer[0]), 2069 + ipr_format_res_path(cfg->res_path, buffer, 2070 + sizeof(buffer)), 2075 2071 link_rate[cfg->link_rate & IPR_PHY_LINK_RATE_MASK], 2076 2072 be32_to_cpu(cfg->wwid[0]), be32_to_cpu(cfg->wwid[1])); 2077 2073 return; ··· 2080 2074 } 2081 2075 ipr_hcam_err(hostrcb, "Path element=%02X: Resource Path=%s, Link rate=%s " 2082 2076 "WWN=%08X%08X\n", cfg->type_status, 2083 - ipr_format_resource_path(&cfg->res_path[0], &buffer[0]), 2077 + ipr_format_res_path(cfg->res_path, buffer, sizeof(buffer)), 2084 2078 link_rate[cfg->link_rate & IPR_PHY_LINK_RATE_MASK], 2085 2079 be32_to_cpu(cfg->wwid[0]), be32_to_cpu(cfg->wwid[1])); 2086 2080 } ··· 2145 2139 2146 2140 ipr_err("RAID %s Array Configuration: %s\n", 2147 2141 error->protection_level, 2148 - ipr_format_resource_path(&error->last_res_path[0], &buffer[0])); 2142 + ipr_format_res_path(error->last_res_path, buffer, sizeof(buffer))); 2149 2143 2150 2144 ipr_err_separator; 2151 2145 ··· 2166 2160 ipr_err("Array Member %d:\n", i); 2167 2161 ipr_log_ext_vpd(&array_entry->vpd); 2168 2162 ipr_err("Current Location: %s", 2169 - ipr_format_resource_path(&array_entry->res_path[0], &buffer[0])); 2163 + ipr_format_res_path(array_entry->res_path, buffer, 2164 + sizeof(buffer))); 2170 2165 ipr_err("Expected Location: %s", 2171 - ipr_format_resource_path(&array_entry->expected_res_path[0], &buffer[0])); 2166 + ipr_format_res_path(array_entry->expected_res_path, 2167 + buffer, sizeof(buffer))); 2172 2168 2173 2169 ipr_err_separator; 2174 2170 } ··· 4087 4079 }; 4088 4080 4089 4081 /** 4090 - * ipr_show_resource_path - Show the resource path for this device. 4082 + * ipr_show_resource_path - Show the resource path or the resource address for 4083 + * this device. 4091 4084 * @dev: device struct 4092 4085 * @buf: buffer 4093 4086 * ··· 4106 4097 4107 4098 spin_lock_irqsave(ioa_cfg->host->host_lock, lock_flags); 4108 4099 res = (struct ipr_resource_entry *)sdev->hostdata; 4109 - if (res) 4100 + if (res && ioa_cfg->sis64) 4110 4101 len = snprintf(buf, PAGE_SIZE, "%s\n", 4111 - ipr_format_resource_path(&res->res_path[0], &buffer[0])); 4102 + ipr_format_res_path(res->res_path, buffer, 4103 + sizeof(buffer))); 4104 + else if (res) 4105 + len = snprintf(buf, PAGE_SIZE, "%d:%d:%d:%d\n", ioa_cfg->host->host_no, 4106 + res->bus, res->target, res->lun); 4107 + 4112 4108 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags); 4113 4109 return len; 4114 4110 } ··· 4365 4351 scsi_adjust_queue_depth(sdev, 0, sdev->host->cmd_per_lun); 4366 4352 if (ioa_cfg->sis64) 4367 4353 sdev_printk(KERN_INFO, sdev, "Resource path: %s\n", 4368 - ipr_format_resource_path(&res->res_path[0], &buffer[0])); 4354 + ipr_format_res_path(res->res_path, buffer, 4355 + sizeof(buffer))); 4369 4356 return 0; 4370 4357 } 4371 4358 spin_unlock_irqrestore(ioa_cfg->host->host_lock, lock_flags);
+3 -2
drivers/scsi/ipr.h
··· 1684 1684 if (ipr_is_device(hostrcb)) { \ 1685 1685 if ((hostrcb)->ioa_cfg->sis64) { \ 1686 1686 printk(KERN_ERR IPR_NAME ": %s: " fmt, \ 1687 - ipr_format_resource_path(&hostrcb->hcam.u.error64.fd_res_path[0], \ 1688 - &hostrcb->rp_buffer[0]), \ 1687 + ipr_format_res_path(hostrcb->hcam.u.error64.fd_res_path, \ 1688 + hostrcb->rp_buffer, \ 1689 + sizeof(hostrcb->rp_buffer)), \ 1689 1690 __VA_ARGS__); \ 1690 1691 } else { \ 1691 1692 ipr_ra_err((hostrcb)->ioa_cfg, \