diff --git a/README b/README index 52d3edfce..04f0fd0b5 100644 --- a/README +++ b/README @@ -49,9 +49,8 @@ qla2x00t_git qla2x00t_git subdirectory Thats all. Now "make all" and other common and QLA specific root -Makefile targets "magically" start working. The bind mount is necessary -for the driver to correctly find the SCST header files. Symlinks can't -do it. +Makefile targets "magically" start working. For detail instructions how +to setup QLA target build environment see its README or HOWTO. You can still build the old driver using qla_old* root Makefile targets. diff --git a/scripts/generate-kernel-patch b/scripts/generate-kernel-patch index ef7ebb037..d41d188e9 100755 --- a/scripts/generate-kernel-patch +++ b/scripts/generate-kernel-patch @@ -385,7 +385,8 @@ do add_file "${f}" "drivers/scst/${f#scst/src/}" fi done - if [ "$s" = "scst_03_public_headers" ]; then + if grep -q /scst_itf_ver.h scst/src/Makefile && + [ "$s" = "scst_03_public_headers" ]; then tmp_itf_ver="$(mktemp /tmp/scst-itf-ver.h.XXXXXXXXXX)" cat <<"EOF" >$tmp_itf_ver /* Autogenerated, don't edit */ diff --git a/scst/src/scst_mem.c b/scst/src/scst_mem.c index ea099a727..7bc6b4418 100644 --- a/scst/src/scst_mem.c +++ b/scst/src/scst_mem.c @@ -1021,7 +1021,13 @@ struct scatterlist *sgv_pool_alloc(struct sgv_pool *pool, unsigned int size, goto out_fail_free; } - TRACE_MEM("Brand new obj %p", obj); + if (likely(!obj->recycling_list_entry.next)) { + TRACE_MEM("Brand new obj %p", obj); + } else if (unlikely(obj->sg_entries != obj->sg_entries_data)) { + TRACE_MEM("Cached obj %p with sg_count == 0", obj); + kfree(obj->sg_entries); + obj->sg_entries = NULL; + } if (pages_to_alloc <= sgv_max_local_pages) { obj->sg_entries = obj->sg_entries_data; diff --git a/scst_local/scst_local.c b/scst_local/scst_local.c index 771532619..d17fc9d47 100644 --- a/scst_local/scst_local.c +++ b/scst_local/scst_local.c @@ -1678,7 +1678,7 @@ static int scst_local_driver_probe(struct device *dev) sess->shost = hpnt; hpnt->max_id = 1; /* Don't want more than one id */ - hpnt->max_lun = SCST_MAX_LUN; + hpnt->max_lun = SCST_MAX_LUN + 1; /* * Because of a change in the size of this field at 2.6.26